<?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 Converting Json Data to Feature Layer in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/converting-json-data-to-feature-layer/m-p/280313#M25883</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm new to Javascript API, but its mostly straight forward with the documentation, however I'm having trouble converting JSON data to a Feature Layer. Now I referred to the reference documents but it seems like I'm missing something.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the idea is we creating our own API on the web server, and fetching the data when needed (of course in JSON format), like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{ id: 1, Company Name: "1670143 Ontario Inc.",&lt;/P&gt;&lt;P&gt;# of Local Employees: 2.5,&lt;/P&gt;&lt;P&gt;Address: "204LebretonStreetNorth Ottawa,OntarioK1R7J1 Canada",&lt;/P&gt;&lt;P&gt;Business Description: "We bring the Internet of All Things to a meaningful conclusion...right in the palm of your hand.", Company Age: "years", Industry: "Software, Cloud and SaaS", Phone: "(613)878-1135"&lt;/P&gt;&lt;P&gt;},&lt;/P&gt;&lt;P&gt;{ id: 2, Company Name: "2CI Technologies Inc",&lt;/P&gt;&lt;P&gt;# of Local Employees: 2.5,&lt;/P&gt;&lt;P&gt;Address: "1678Canemorecrescent Ottawa,OntarioK4A1S8 Canada",&lt;/P&gt;&lt;P&gt;Business Description: "Health and wellness IT development",&lt;/P&gt;&lt;P&gt;Company Age: "20 years",&lt;/P&gt;&lt;P&gt;Industry: "IT Consultants and Software Services", Phone: "(613)834-8144"&lt;/P&gt;&lt;P&gt;},&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now when im trying to convert the JSON Object with:&lt;/P&gt;&lt;P&gt;var flRenderer = rendererJsonUtils.fromJSON(json_object);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i get &lt;EM&gt;null&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did anybody stumbled upon this issue before?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S.&lt;/P&gt;&lt;P&gt;Im working version 4.4 of the API.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Jul 2017 21:08:55 GMT</pubDate>
    <dc:creator>AntonAntonenko</dc:creator>
    <dc:date>2017-07-06T21:08:55Z</dc:date>
    <item>
      <title>Converting Json Data to Feature Layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/converting-json-data-to-feature-layer/m-p/280313#M25883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm new to Javascript API, but its mostly straight forward with the documentation, however I'm having trouble converting JSON data to a Feature Layer. Now I referred to the reference documents but it seems like I'm missing something.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the idea is we creating our own API on the web server, and fetching the data when needed (of course in JSON format), like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{ id: 1, Company Name: "1670143 Ontario Inc.",&lt;/P&gt;&lt;P&gt;# of Local Employees: 2.5,&lt;/P&gt;&lt;P&gt;Address: "204LebretonStreetNorth Ottawa,OntarioK1R7J1 Canada",&lt;/P&gt;&lt;P&gt;Business Description: "We bring the Internet of All Things to a meaningful conclusion...right in the palm of your hand.", Company Age: "years", Industry: "Software, Cloud and SaaS", Phone: "(613)878-1135"&lt;/P&gt;&lt;P&gt;},&lt;/P&gt;&lt;P&gt;{ id: 2, Company Name: "2CI Technologies Inc",&lt;/P&gt;&lt;P&gt;# of Local Employees: 2.5,&lt;/P&gt;&lt;P&gt;Address: "1678Canemorecrescent Ottawa,OntarioK4A1S8 Canada",&lt;/P&gt;&lt;P&gt;Business Description: "Health and wellness IT development",&lt;/P&gt;&lt;P&gt;Company Age: "20 years",&lt;/P&gt;&lt;P&gt;Industry: "IT Consultants and Software Services", Phone: "(613)834-8144"&lt;/P&gt;&lt;P&gt;},&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now when im trying to convert the JSON Object with:&lt;/P&gt;&lt;P&gt;var flRenderer = rendererJsonUtils.fromJSON(json_object);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i get &lt;EM&gt;null&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did anybody stumbled upon this issue before?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S.&lt;/P&gt;&lt;P&gt;Im working version 4.4 of the API.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jul 2017 21:08:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/converting-json-data-to-feature-layer/m-p/280313#M25883</guid>
      <dc:creator>AntonAntonenko</dc:creator>
      <dc:date>2017-07-06T21:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: Converting Json Data to Feature Layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/converting-json-data-to-feature-layer/m-p/280314#M25884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Anton,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a pretty broad question. Firstly, to create a Feature Layer,&amp;nbsp;you first need to create a list of Graphic Objects, which the Feature Layer expects, e.g.:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;[{ &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #595959;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;geometry&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;: &lt;/SPAN&gt;&lt;SPAN class="" style="color: #aa0d91; font-weight: bold;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt; Point({ &lt;/SPAN&gt;&lt;SPAN class="" style="color: #595959;"&gt;x&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;: &lt;/SPAN&gt;&lt;SPAN class="" style="color: #1c00cf;"&gt;-100&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;, &lt;/SPAN&gt;&lt;SPAN class="" style="color: #595959;"&gt;y&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;: &lt;/SPAN&gt;&lt;SPAN class="" style="color: #1c00cf;"&gt;38&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt; }), &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #595959;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;attributes&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;: { &lt;/SPAN&gt;&lt;SPAN class="" style="color: #595959;"&gt;ObjectID&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;: &lt;/SPAN&gt;&lt;SPAN class="" style="color: #1c00cf;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;, &lt;/SPAN&gt;&lt;SPAN class="" style="color: #595959;"&gt;DepArpt&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;: &lt;/SPAN&gt;&lt;SPAN class="" style="color: #c41a16;"&gt;"KATL"&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;, &lt;/SPAN&gt;&lt;SPAN class="" style="color: #595959;"&gt;MsgTime&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;: &lt;/SPAN&gt;&lt;SPAN class="" style="color: #5c2699;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;.now(), &lt;/SPAN&gt;&lt;SPAN class="" style="color: #595959;"&gt;FltId&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;: &lt;/SPAN&gt;&lt;SPAN class="" style="color: #c41a16;"&gt;"UAL1"&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt; } &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;}, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;{ &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #595959;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;geometry&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;: &lt;/SPAN&gt;&lt;SPAN class="" style="color: #aa0d91; font-weight: bold;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt; Point({ &lt;/SPAN&gt;&lt;SPAN class="" style="color: #595959;"&gt;x&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;: &lt;/SPAN&gt;&lt;SPAN class="" style="color: #1c00cf;"&gt;-77&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;, &lt;/SPAN&gt;&lt;SPAN class="" style="color: #595959;"&gt;y&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;: &lt;/SPAN&gt;&lt;SPAN class="" style="color: #1c00cf;"&gt;35&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt; }), &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #595959;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;attributes&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;: { &lt;/SPAN&gt;&lt;SPAN class="" style="color: #595959;"&gt;ObjectID&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;: &lt;/SPAN&gt;&lt;SPAN class="" style="color: #1c00cf;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;, &lt;/SPAN&gt;&lt;SPAN class="" style="color: #595959;"&gt;DepArpt&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;: &lt;/SPAN&gt;&lt;SPAN class="" style="color: #c41a16;"&gt;"KZBW"&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;, &lt;/SPAN&gt;&lt;SPAN class="" style="color: #595959;"&gt;MsgTime&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;: &lt;/SPAN&gt;&lt;SPAN class="" style="color: #5c2699;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;.now(), &lt;/SPAN&gt;&lt;SPAN class="" style="color: #595959;"&gt;FltId&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;: &lt;/SPAN&gt;&lt;SPAN class="" style="color: #c41a16;"&gt;"SW999"&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt; } &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;}]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;Each feature will need to be a &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html"&gt;Graphic object&lt;/A&gt;&amp;nbsp;(the attributes above are just examples).&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;You can then use the Feature Layer's source property to set the layers graphics to the above list of features. See this part of the API docs:&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#source" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#source"&gt;FeatureLayer | API Reference | ArcGIS API for JavaScript 4.&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;Or, if you have ArcGIS Server, or a Hosted Feature Layer in ArcGIS Online or Portal, you can point your Feature Layer directly to those services.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;Secondly, the rendererJsonUtils is the wrong thing to be using here to convert your JSON into features. A &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html"&gt;Renderer &lt;/A&gt;in the JavaScript API, is used to define how features are visually represented, not the feature object itself.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;To parse your JSON into features, especially through your own Web Server API, there are numerous ways to achieve this. You could use the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#fromJSON"&gt;Graphic fromJSON method&lt;/A&gt;&amp;nbsp;on each feature and store the Graphic object in an array, then use that array as your source for the Feature Layer. Alternatively, you could get your Web Server API to return more specific formatting on your features and then use the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html#fromJSON"&gt;FeatureSet fromJSON&lt;/A&gt; method, then use that as your source. However this case would require quite a bit more effort to return the appropriate JSON structure as specified by the &lt;A href="http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/FeatureSet_object/02r3000002mn000000/"&gt;ArcGIS REST API&lt;/A&gt;. Going down this path is essentially mimicking the behaviour of ArcGIS Server and Hosted Feature Layers.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;Finally, depending on your use cases for a Feature Layer, it may be easier to start with a &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html"&gt;Graphics Layer&lt;/A&gt;&amp;nbsp;to store your graphics. I would also suggest looking through the JavaScript API Samples, as there is a specific example, which is closely related to what you're trying to do:&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/sample-code/layers-featurelayer-collection/index.html" title="https://developers.arcgis.com/javascript/latest/sample-code/layers-featurelayer-collection/index.html"&gt;Create a FeatureLayer with client side graphics | ArcGIS API for JavaScript 4.4&lt;/A&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jul 2017 01:58:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/converting-json-data-to-feature-layer/m-p/280314#M25884</guid>
      <dc:creator>JordanKing3</dc:creator>
      <dc:date>2017-07-07T01:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: Converting Json Data to Feature Layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/converting-json-data-to-feature-layer/m-p/280315#M25885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Jordan,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the detailed response, its starting to get clearer to me. I apologize in advance, because I'm still fairly new to this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I took your advice, and I'm looping through each object in my returned response from my API, creating a Graphic from each Object in the returned response in the following manner:&lt;/P&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-size: 12px;"&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;data.forEach(function(element) {
 var new_graphic = Graphic.fromJSON(element);
 graphics_array.push(new_graphic);
 }, this);‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;however, when i console log &lt;STRONG&gt;&lt;EM&gt;graphics_array&lt;/EM&gt;&lt;/STRONG&gt;, i see this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="/legacyfs/online/360987_Screen Shot 2017-07-09 at 4.47.12 PM.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;across all the graphic object saved in&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;graphics_array .&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Now the objects I was looping through weren't empty, they all shared the following structure:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-2 jive-image j-img-original" src="/legacyfs/online/360988_Screen Shot 2017-07-09 at 4.51.06 PM.png" style="width: 620px; height: 242px;" /&gt;&lt;/P&gt;&lt;P&gt;I know I'm missing something, since the conversion happens&amp;nbsp;with no errors, but the data gets lost in the mids of it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looking at last link that you posted in your previous response, I noticed that block of code, which I think is most relevant to my issue:&amp;nbsp;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; geometry&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Point&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;coordinates&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;coordinates&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;// select only the attributes you care about&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; attributes&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ObjectID&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; i&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; title&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;properties&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;title&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;properties&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;type&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; place&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;properties&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;place&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; depth&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;coordinates&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;" km"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; time&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;properties&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;time&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mag&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;properties&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mag&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mmi&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;properties&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mmi&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; felt&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;properties&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;felt&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sig&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;properties&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;sig&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; url&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;properties&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;url
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I haven't noticed any use of &lt;STRONG&gt;&lt;EM&gt;fromJSON()&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;at all though.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also noticed that instead of using &lt;STRONG&gt;&lt;EM&gt;new Graphic()&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;its using &lt;EM&gt;&lt;STRONG&gt;new Point()&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;. is there a difference between Graphic and Point? Ultimately I'm looking to populate the the map with a new FeatureLayer that will distribute the points according to the &lt;EM&gt;&lt;STRONG&gt;address&lt;/STRONG&gt;&lt;/EM&gt; in the response object.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I also noticed the presence of the &lt;EM&gt;&lt;STRONG&gt;x&lt;/STRONG&gt;&lt;/EM&gt; and &lt;EM&gt;&lt;STRONG&gt;y&lt;/STRONG&gt;&lt;/EM&gt; properties, in my response object there is no sign of &lt;EM&gt;&lt;STRONG&gt;x&lt;/STRONG&gt;&lt;/EM&gt; and &lt;EM&gt;&lt;STRONG&gt;y&lt;/STRONG&gt; &lt;STRONG&gt;coordinates&lt;/STRONG&gt;&lt;/EM&gt;, like I mentioned above, I was hoping to populate the points using the &lt;EM&gt;&lt;STRONG&gt;address&lt;/STRONG&gt;&lt;/EM&gt; property in my response object.&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I know what should go in the attribute property of my Graphic object, is that where my: &lt;EM&gt;&lt;STRONG&gt;address, # of local employees, company name&lt;/STRONG&gt;&lt;/EM&gt;... should go?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again Jordan for your patience and guidance. I posted the following pictures and code sample to make it as understandable as possible. Hopefully my issue&amp;nbsp;once solved will be able to help other developers that have similar issue.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Anton.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:37:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/converting-json-data-to-feature-layer/m-p/280315#M25885</guid>
      <dc:creator>AntonAntonenko</dc:creator>
      <dc:date>2021-12-11T13:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: Converting Json Data to Feature Layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/converting-json-data-to-feature-layer/m-p/280316#M25886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Anton,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You're close. That code block you pasted in is the key to this. That defines the structure of a Graphic object, which your JSON needs to conform to, in order to create a proper Graphic. A Graphic is an object which stores both Geometry (a Point, Line, Polygon etc.) and Attributes for that graphic. Also note that you will need to have some kind of unique identifier in your attributes. Generally Esri calls this the OBJECTID, but it can be called anything, as long as the name of the unique ID field is specified when defining the Feature Layer fields (see example below).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You cannot populate the Geometry using a street address, you need to convert this to x, y coordinates somehow first. To do this, you'll need to use a Geocoder. Esri has a Geocoder available, but you need to sign up as a Developer in order to get access to it:&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/features/geocoding/" title="https://developers.arcgis.com/features/geocoding/"&gt;Geocoding and Place Search | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;. This is also going to add another layer of complexity to your code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You're correct, you need to use your address, company name etc. as the attributes. Here is an example for you, which is doing most of what you want, except for the geocoding to get x, y coordinates from a street address:&amp;nbsp;&lt;A class="link-titled" href="http://jsbin.com/kuzehavego/edit?js,output" title="http://jsbin.com/kuzehavego/edit?js,output"&gt;JS Bin - Collaborative JavaScript Debugging&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you decide to use the Esri Geocoder above, it shouldn't be to hard to plug that in and create the Geometry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Jordan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jul 2017 00:58:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/converting-json-data-to-feature-layer/m-p/280316#M25886</guid>
      <dc:creator>JordanKing3</dc:creator>
      <dc:date>2017-07-10T00:58:20Z</dc:date>
    </item>
    <item>
      <title>Re: Converting Json Data to Feature Layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/converting-json-data-to-feature-layer/m-p/280317#M25887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Jordan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for the late response, I was having major progress thanks to your guidance!&amp;nbsp;&lt;/P&gt;&lt;P&gt;I managed to show the points on the map just like in the example that you provided me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However I have some other issue relating to graph in popups and measuring distance, but that I suppose is more suitable for a new topic in the forum.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate your help and effort, I learned a lot thanks to you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Anton.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jul 2017 18:22:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/converting-json-data-to-feature-layer/m-p/280317#M25887</guid>
      <dc:creator>AntonAntonenko</dc:creator>
      <dc:date>2017-07-12T18:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: Converting Json Data to Feature Layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/converting-json-data-to-feature-layer/m-p/280318#M25888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anton,&lt;/P&gt;&lt;P&gt;I am working on a similar issue and need to get a layer to plot locations from a JSON Feed from my specific API web service.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The example above is a big help but I am struggling to figure out how to pull the JSON feed from my web service.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any chance you can provide an example of how you got it to work?4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Aug 2017 02:22:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/converting-json-data-to-feature-layer/m-p/280318#M25888</guid>
      <dc:creator>MattWilliams4</dc:creator>
      <dc:date>2017-08-21T02:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: Converting Json Data to Feature Layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/converting-json-data-to-feature-layer/m-p/280319#M25889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Matt,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Do you know how to call the web service from a browser? Is it a SOAP or RESTfull web service?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Aug 2017 02:41:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/converting-json-data-to-feature-layer/m-p/280319#M25889</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-08-24T02:41:48Z</dc:date>
    </item>
    <item>
      <title>Re: Converting Json Data to Feature Layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/converting-json-data-to-feature-layer/m-p/280320#M25890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It’s a restful web service&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Aug 2017 03:02:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/converting-json-data-to-feature-layer/m-p/280320#M25890</guid>
      <dc:creator>MattWilliams4</dc:creator>
      <dc:date>2017-08-24T03:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: Converting Json Data to Feature Layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/converting-json-data-to-feature-layer/m-p/280321#M25891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Matt,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Then you just use esriRequest then.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/jsapi/esri.request-amd.html" title="https://developers.arcgis.com/javascript/3/jsapi/esri.request-amd.html"&gt;esri/request | API Reference | ArcGIS API for JavaScript 3.21&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Aug 2017 03:59:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/converting-json-data-to-feature-layer/m-p/280321#M25891</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-08-24T03:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: Converting Json Data to Feature Layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/converting-json-data-to-feature-layer/m-p/1098844#M74682</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have json data coming from different web service , i am able to plot points on map using this json data. how can i show this data in the feature table?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Sep 2021 09:24:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/converting-json-data-to-feature-layer/m-p/1098844#M74682</guid>
      <dc:creator>aki400</dc:creator>
      <dc:date>2021-09-16T09:24:50Z</dc:date>
    </item>
  </channel>
</rss>

