<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Accessing Non-Enumerable Nested Objects? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/accessing-non-enumerable-nested-objects/m-p/587390#M54876</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using YQL to get some html from a website so that I can scrape it for values. The site is &lt;A href="http://www.tides.gc.ca/eng/station?type=1&amp;amp;date=2016%2F03%2F17&amp;amp;sid=7654&amp;amp;tz=PDT&amp;amp;pres=1" title="http://www.tides.gc.ca/eng/station?type=1&amp;amp;date=2016%2F03%2F17&amp;amp;sid=7654&amp;amp;tz=PDT&amp;amp;pres=1"&gt;24 Hours Tidal Preliminary Observations - Tides, Currents, and Water Levels&lt;/A&gt;&amp;nbsp; (URL to be updated by javascript depending on the current day to get the last 24 hours of data) . The YQL REST query is &lt;A href="https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20html%20where%20url%3D%22http%3A%2F%2Fwww.tides.gc.ca%2Feng%2Fstation%3Ftype%3D1%26date%3D2016%252F03%252F16%26sid%3D7654%26tz%3DPDT%26pres%3D1%22%20and%0A%20%20%20%20%20%20xpath%3D'%2F%2Ftr'&amp;amp;format=json&amp;amp;diagnostics=true&amp;amp;callback="&gt;https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20html%20where%20url%3D%22http%3A%2F%2Fwww.tides.gc.ca%2Fe… &lt;/A&gt; which returns JSON.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to use Object.getOwnPropertyNames(obj) but it seems that I'm getting inconsistent results. Yesterday all property names within the object were being returned, today it seems only enumerable property names are being returned. I changed nothing from yesterday afternoon to this morning. If you visit this &lt;A href="http://jsfiddle.net/LauraM/436dgns4/7/"&gt;jsfiddle&lt;/A&gt; and open the console (in Google Chrome) you can see that the object contains a second nested object called "responseJSON", which is what I'm trying to access. In IE it's not showing the nested object I'm after, interestingly, when logging the main object - only showing enumerable property names.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yesterday this returned ALL the property names to the Chrome console, as it should:&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14583224510487845" data-renderedposition="394_50_798_16" jivemacro_uid="_14583224510487845"&gt;&lt;P&gt;console.log(Object.getOwnPropertyNames(jqxhr));&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Today it does not. I don't know how that's possible...yesterday I was able to access the portion of my desired data with:&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14583224587323901" data-renderedposition="462_50_798_16" jivemacro_uid="_14583224587323901"&gt;&lt;P&gt; console.log(jqxhr["responseJSON"]["query"]["results"]["tr"]["100"]);&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but no longer today. I get back that "responseJSON" is undefined.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would appreciate hearing from anyone who has experience working with nested objects/arrays.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Mar 2016 18:29:43 GMT</pubDate>
    <dc:creator>LauraMiles1</dc:creator>
    <dc:date>2016-03-18T18:29:43Z</dc:date>
    <item>
      <title>Accessing Non-Enumerable Nested Objects?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/accessing-non-enumerable-nested-objects/m-p/587390#M54876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using YQL to get some html from a website so that I can scrape it for values. The site is &lt;A href="http://www.tides.gc.ca/eng/station?type=1&amp;amp;date=2016%2F03%2F17&amp;amp;sid=7654&amp;amp;tz=PDT&amp;amp;pres=1" title="http://www.tides.gc.ca/eng/station?type=1&amp;amp;date=2016%2F03%2F17&amp;amp;sid=7654&amp;amp;tz=PDT&amp;amp;pres=1"&gt;24 Hours Tidal Preliminary Observations - Tides, Currents, and Water Levels&lt;/A&gt;&amp;nbsp; (URL to be updated by javascript depending on the current day to get the last 24 hours of data) . The YQL REST query is &lt;A href="https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20html%20where%20url%3D%22http%3A%2F%2Fwww.tides.gc.ca%2Feng%2Fstation%3Ftype%3D1%26date%3D2016%252F03%252F16%26sid%3D7654%26tz%3DPDT%26pres%3D1%22%20and%0A%20%20%20%20%20%20xpath%3D'%2F%2Ftr'&amp;amp;format=json&amp;amp;diagnostics=true&amp;amp;callback="&gt;https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20html%20where%20url%3D%22http%3A%2F%2Fwww.tides.gc.ca%2Fe… &lt;/A&gt; which returns JSON.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to use Object.getOwnPropertyNames(obj) but it seems that I'm getting inconsistent results. Yesterday all property names within the object were being returned, today it seems only enumerable property names are being returned. I changed nothing from yesterday afternoon to this morning. If you visit this &lt;A href="http://jsfiddle.net/LauraM/436dgns4/7/"&gt;jsfiddle&lt;/A&gt; and open the console (in Google Chrome) you can see that the object contains a second nested object called "responseJSON", which is what I'm trying to access. In IE it's not showing the nested object I'm after, interestingly, when logging the main object - only showing enumerable property names.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yesterday this returned ALL the property names to the Chrome console, as it should:&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14583224510487845" data-renderedposition="394_50_798_16" jivemacro_uid="_14583224510487845"&gt;&lt;P&gt;console.log(Object.getOwnPropertyNames(jqxhr));&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Today it does not. I don't know how that's possible...yesterday I was able to access the portion of my desired data with:&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14583224587323901" data-renderedposition="462_50_798_16" jivemacro_uid="_14583224587323901"&gt;&lt;P&gt; console.log(jqxhr["responseJSON"]["query"]["results"]["tr"]["100"]);&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but no longer today. I get back that "responseJSON" is undefined.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would appreciate hearing from anyone who has experience working with nested objects/arrays.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Mar 2016 18:29:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/accessing-non-enumerable-nested-objects/m-p/587390#M54876</guid>
      <dc:creator>LauraMiles1</dc:creator>
      <dc:date>2016-03-18T18:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Non-Enumerable Nested Objects?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/accessing-non-enumerable-nested-objects/m-p/587391#M54877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In your jsfiddle, try putting all of the console.log statements for getting your data in a deferred.done() method:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://jsfiddle.net/4oa6n10e/" title="http://jsfiddle.net/4oa6n10e/"&gt;Get Nested Objects - JSFiddle&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" height="534" src="https://community.esri.com/legacyfs/online/192573_pastedImage_3.png" style="width: 546px; height: 533.671px;" width="546" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will make sure the query has resolved before trying to access the data - &lt;A href="https://api.jquery.com/deferred.done/" title="https://api.jquery.com/deferred.done/"&gt;https://api.jquery.com/deferred.done/&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Mar 2016 13:57:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/accessing-non-enumerable-nested-objects/m-p/587391#M54877</guid>
      <dc:creator>ChrisSmith7</dc:creator>
      <dc:date>2016-03-21T13:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Non-Enumerable Nested Objects?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/accessing-non-enumerable-nested-objects/m-p/587392#M54878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Chris. I should have known by the inconsistency of results that I was trying to access the data before it was finished returning!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Mar 2016 14:47:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/accessing-non-enumerable-nested-objects/m-p/587392#M54878</guid>
      <dc:creator>LauraMiles1</dc:creator>
      <dc:date>2016-03-21T14:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Non-Enumerable Nested Objects?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/accessing-non-enumerable-nested-objects/m-p/587393#M54879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No problem - sometimes it's just another set of eyes!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Mar 2016 14:49:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/accessing-non-enumerable-nested-objects/m-p/587393#M54879</guid>
      <dc:creator>ChrisSmith7</dc:creator>
      <dc:date>2016-03-21T14:49:36Z</dc:date>
    </item>
  </channel>
</rss>

