<?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 Re: Access Attribute in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/access-attribute/m-p/557925#M52066</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;That got me on the right track, I also needed to change the property Graphic to feature.&amp;nbsp; However,&amp;nbsp; when I get my result it always says undefined.&amp;nbsp; Is there away to see the raw json returned besides fiddler?&amp;nbsp; I am using Visual Studio.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I dont use VS, i just use Mozilla and you can alert toSource()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;however, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;An identify should return a FeatureSet.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;so you can do&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//featureSet.features returns a Graphics Array&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;dojo.forEach(featureSet.features, dojo.hitch(this, function(feature){&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;//each feature is a graphic&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;//feature.attributes is the json object&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;alert(feature.attributes["Field_NAME"]);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}));&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Sep 2011 18:19:19 GMT</pubDate>
    <dc:creator>JeffPace</dc:creator>
    <dc:date>2011-09-09T18:19:19Z</dc:date>
    <item>
      <title>Access Attribute</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/access-attribute/m-p/557922#M52063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am doing an Identify task and the results come back fine.&amp;nbsp; I want to get a single value out of the returned results.&amp;nbsp; How would I do that?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var segResult = idResult.Graphic;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;alert(segResult.attributes[0]);&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Sep 2011 15:51:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/access-attribute/m-p/557922#M52063</guid>
      <dc:creator>BrianGustafson</dc:creator>
      <dc:date>2011-09-09T15:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: Access Attribute</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/access-attribute/m-p/557923#M52064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I am doing an Identify task and the results come back fine.&amp;nbsp; I want to get a single value out of the returned results.&amp;nbsp; How would I do that?&lt;BR /&gt;&lt;BR /&gt;var segResult = idResult.Graphic;&lt;BR /&gt;alert(segResult.attributes[0]);&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;attributes are a json object.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;so if you know the field name, you can do&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;alert(segResult.attributes["FIELD_NAME"]);&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Sep 2011 16:19:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/access-attribute/m-p/557923#M52064</guid>
      <dc:creator>JeffPace</dc:creator>
      <dc:date>2011-09-09T16:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: Access Attribute</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/access-attribute/m-p/557924#M52065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That got me on the right track, I also needed to change the property Graphic to feature.&amp;nbsp; However,&amp;nbsp; when I get my result it always says undefined.&amp;nbsp; Is there away to see the raw json returned besides fiddler?&amp;nbsp; I am using Visual Studio.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Sep 2011 16:39:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/access-attribute/m-p/557924#M52065</guid>
      <dc:creator>BrianGustafson</dc:creator>
      <dc:date>2011-09-09T16:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: Access Attribute</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/access-attribute/m-p/557925#M52066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;That got me on the right track, I also needed to change the property Graphic to feature.&amp;nbsp; However,&amp;nbsp; when I get my result it always says undefined.&amp;nbsp; Is there away to see the raw json returned besides fiddler?&amp;nbsp; I am using Visual Studio.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I dont use VS, i just use Mozilla and you can alert toSource()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;however, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;An identify should return a FeatureSet.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;so you can do&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//featureSet.features returns a Graphics Array&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;dojo.forEach(featureSet.features, dojo.hitch(this, function(feature){&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;//each feature is a graphic&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;//feature.attributes is the json object&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;alert(feature.attributes["Field_NAME"]);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}));&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Sep 2011 18:19:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/access-attribute/m-p/557925#M52066</guid>
      <dc:creator>JeffPace</dc:creator>
      <dc:date>2011-09-09T18:19:19Z</dc:date>
    </item>
    <item>
      <title>Re: Access Attribute</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/access-attribute/m-p/557926#M52067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Is there away to see the raw json returned besides fiddler?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can tweak the URL sent to your service and see the JSON directly in the browser. For instance, &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/find_drilldown.html"&gt;the basic identify sample&lt;/A&gt;&lt;SPAN&gt;&lt;SPAN&gt;, when you click the map, issues a request like this:&amp;nbsp; &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/BloomfieldHillsMichigan/Parcels/MapServer/identify?f=json&amp;amp;geometry=" rel="nofollow" target="_blank"&gt;http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/BloomfieldHillsMichigan/Parcels/MapServer/identify?f=json&amp;amp;geometry=&lt;/A&gt;&lt;SPAN&gt;{%22x%22%3A-9270185.452645523%2C%22y%22%3A5247230.008462553%2C%22spatialReference%22%3A{%22wkid%22%3A102100}}&amp;amp;tolerance=3&amp;amp;returnGeometry=true&amp;amp;mapExtent={%22xmin%22%3A-9270630.93720096%2C%22ymin%22%3A5246864.543921095%2C%22xmax%22%3A-9269675.474347476%2C%22ymax%22%3A5247581.141061208%2C%22spatialReference%22%3A{%22wkid%22%3A102100}}&amp;amp;imageDisplay=800%2C600%2C96&amp;amp;geometryType=esriGeometryPoint&amp;amp;sr=102100&amp;amp;layers=all%3A0%2C2&amp;amp;callback=dojo.io.script.jsonp_dojoIoScript3._jsonpCallback&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;If you change the f query string parameter to pjson and remove the callback stuff, you get this:&amp;nbsp; &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/BloomfieldHillsMichigan/Parcels/MapServer/identify?f=pjson&amp;amp;geometry=" rel="nofollow" target="_blank"&gt;http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/BloomfieldHillsMichigan/Parcels/MapServer/identify?f=pjson&amp;amp;geometry=&lt;/A&gt;&lt;SPAN&gt;{%22x%22%3A-9270185.452645523%2C%22y%22%3A5247230.008462553%2C%22spatialReference%22%3A{%22wkid%22%3A102100}}&amp;amp;tolerance=3&amp;amp;returnGeometry=true&amp;amp;mapExtent={%22xmin%22%3A-9270630.93720096%2C%22ymin%22%3A5246864.543921095%2C%22xmax%22%3A-9269675.474347476%2C%22ymax%22%3A5247581.141061208%2C%22spatialReference%22%3A{%22wkid%22%3A102100}}&amp;amp;imageDisplay=800%2C600%2C96&amp;amp;geometryType=esriGeometryPoint&amp;amp;sr=102100&amp;amp;layers=all%3A0%2C2&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Sep 2011 18:22:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/access-attribute/m-p/557926#M52067</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2011-09-09T18:22:42Z</dc:date>
    </item>
  </channel>
</rss>

