<?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: GeoEvent-Poll an External Website for JSON in ArcGIS GeoEvent Server Questions</title>
    <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/geoevent-poll-an-external-website-for-json/m-p/1417888#M4174</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/693794"&gt;@RipaliBatra&lt;/a&gt;&amp;nbsp;--&lt;/P&gt;&lt;P&gt;Given the rich hierarchical structure of the JSON you are receiving from the&amp;nbsp;&lt;A href="https://waqi.info" target="_blank"&gt;https://waqi.info&lt;/A&gt;&amp;nbsp;web service you really cannot rely on the&amp;nbsp;&lt;EM&gt;GeoEvent Sampler&lt;/EM&gt; for a good representation of the data. The sampler struggles when given complex hierarchical JSON.&lt;/P&gt;&lt;P&gt;A better approach is to create one or more&amp;nbsp;&lt;EM&gt;Write to a JSON File&lt;/EM&gt;&amp;nbsp;outputs and use them to log the event records emitted from different processors along your configured event processing workflow.&lt;/P&gt;&lt;P&gt;I have a GeoEvent Server 11.1 deployment that I used to test your feed. I was able to allow a&amp;nbsp;&lt;EM&gt;Receive JSON on a REST Endpoint&lt;/EM&gt; input to generate a GeoEvent Definition for me. A sample of the data I sent to my GeoEvent Server input and the generated GeoEvent Definition are shown below {Fig 1] and [Fig 2]. Note that I specified the input use&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/EM&gt; as the root of the JSON structure when adapting the received JSON.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RJSunderman_2-1714609944534.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/102766i9B5208896F02ABB5/image-size/large?v=v2&amp;amp;px=999" role="button" title="RJSunderman_2-1714609944534.png" alt="RJSunderman_2-1714609944534.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RJSunderman_3-1714609956345.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/102767i0912F5D782A17294/image-size/large?v=v2&amp;amp;px=999" role="button" title="RJSunderman_3-1714609956345.png" alt="RJSunderman_3-1714609956345.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Note:&amp;nbsp; Be careful when relying on auto-generated GeoEvent Definitions. An input will make its "best guess" as to what the GeoEvent Definition ought to be based on the first data record it receives. But the generated event definition will often use&amp;nbsp;&lt;EM&gt;Double&lt;/EM&gt; for data values received as epoch long integer values (for example). You have to review the generated GeoEvent Definition and verify that each array and element will be adapted properly for the data you expect to receive.&lt;/P&gt;&lt;P&gt;I was able to configure a&amp;nbsp;&lt;EM&gt;Field Mapper&lt;/EM&gt; to pull specific values out of the hierarchical JSON:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RJSunderman_4-1714610151074.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/102768i60FBAC5420BC5AED/image-size/large?v=v2&amp;amp;px=999" role="button" title="RJSunderman_4-1714610151074.png" alt="RJSunderman_4-1714610151074.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Note the expressions being used to access the data:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Attributions&lt;/STRONG&gt; is an array, so we have to provide the index of the element we want to access from that array.&amp;nbsp;&lt;STRONG&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif" size="2"&gt;attributions[1].name&lt;/FONT&gt;&lt;/STRONG&gt; accesses the second element in the array, the one with the named string &lt;STRONG&gt;&lt;FONT color="#008000"&gt;"World Air Quality Index Project"&lt;/FONT&gt;&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;City&lt;/STRONG&gt; is the name of an element, so we do not access it with ordinal values like we do when accessing the array. &lt;STRONG&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif" size="2"&gt;city.name&lt;/FONT&gt;&lt;/STRONG&gt; is sufficient to retrieve the string &lt;FONT color="#008000"&gt;&lt;STRONG&gt;"B R Ambedkar University, Lucknow, India"&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;The latitude and longitude coordinates in the city element, however, are in an array nested within an element. When pulling these as separate values we have to specify their ordinal positions in the array:&lt;UL&gt;&lt;LI&gt;The latitude is&amp;nbsp;&lt;STRONG&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif" size="2"&gt;city.geo[0]&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;The longitude is&amp;nbsp;&lt;STRONG&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif" size="2"&gt;city.geo[1]&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;The iaqi values are grouped within an element. Accessing them is fairly straightforward:&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif" size="2"&gt;iaqi.co.v&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif" size="2"&gt;iaqi.no2.v&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif" size="2"&gt;iaqi.pm10.v&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif" size="2"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;In my&amp;nbsp;&lt;EM&gt;Field Mapper&lt;/EM&gt; illustration I only pulled the string for the "day", but if we wanted to be a little more creative we could build a string from available values for a given day. The string value&amp;nbsp;&lt;STRONG&gt;&lt;FONT color="#008000"&gt;"Day: 2024-05-01 (Avg/Min/Max: 29.0 / 14.0 / 50.0)"&lt;/FONT&gt;&lt;/STRONG&gt; could be build using the following expression to pull individual values and append them together -- taking care to use the toString( ) function to explicitly cast&amp;nbsp;&lt;EM&gt;Double&lt;/EM&gt; values to&amp;nbsp;&lt;EM&gt;String&lt;/EM&gt; values when appending them to literal strings:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif" size="2"&gt;'Day: ' + toString(forecast.daily.o3[2].day) + ' (Avg/Min/Max: ' + toString(forecast.daily.o3[2].avg) + ' / ' + toString(forecast.daily.o3[2].min) + ' / ' + toString(forecast.daily.o3[2].max) +')'&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Because the daily forecast values for "o3", "pm10", and "pm25" all have the same elemental structure you will&amp;nbsp;&lt;EM&gt;&lt;U&gt;not&lt;/U&gt;&lt;/EM&gt; be able to use a&amp;nbsp;&lt;EM&gt;Multicardinal Field Splitter&lt;/EM&gt; processor to collapse or flatten these three arrays.&amp;nbsp; It looks like these arrays are allowed to contain a variable number of items. The array&amp;nbsp;&lt;STRONG&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif" size="2"&gt;o3&lt;/FONT&gt;&lt;/STRONG&gt; has 8 elements whereas the arrays&amp;nbsp;&lt;STRONG&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif" size="2"&gt;pm10&lt;/FONT&gt;&lt;/STRONG&gt; and &lt;STRONG&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif" size="2"&gt;pm25&lt;/FONT&gt;&lt;/STRONG&gt; both have 9 elements. There is no iterator or looping mechanism available in any of GeoEvent Server's processors, so you will very likely have to stick with extracting essential information from the JSON using field calculation expressions like I show above.&lt;/P&gt;&lt;P&gt;Hope this information helps, and a special&amp;nbsp;&lt;EM&gt;Thank You&lt;/EM&gt; to&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/600731"&gt;@Gene_Sipes&lt;/a&gt;&amp;nbsp;for jumping in to help with this complicated hierarchical JSON.&lt;/P&gt;&lt;P&gt;-- RJ&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 02 May 2024 01:16:11 GMT</pubDate>
    <dc:creator>RJSunderman</dc:creator>
    <dc:date>2024-05-02T01:16:11Z</dc:date>
    <item>
      <title>GeoEvent-Poll an External Website for JSON</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/geoevent-poll-an-external-website-for-json/m-p/1401957#M4154</link>
      <description>&lt;P&gt;I have configured API in the Input connector, but the response of API is not correctly mapped when there is an array or nested JSON.It is only considering the parent JSON and thus all the content is not fetched properly.&lt;/P&gt;&lt;P&gt;Can someone please guide me if I am missing something, or this is how it behaves and there is some other approach to handle it.&lt;/P&gt;&lt;P&gt;&lt;A href="https://api.waqi.info/feed/lucknow/?token=fa73462a52dbbb8848d20a0554fb72424af90975" target="_blank" rel="noopener"&gt;API : api.waqi.info/feed/lucknow/?token=fa73462a52dbbb8848d20a0554fb72424af90975&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tes.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/99324iF747B0F98B97558C/image-size/large?v=v2&amp;amp;px=999" role="button" title="tes.png" alt="tes.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Incorrect JSON:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-03-28 192714.png" style="width: 687px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/99321iE2E4575676C27396/image-dimensions/687x310?v=v2" width="687" height="310" role="button" title="Screenshot 2024-03-28 192714.png" alt="Screenshot 2024-03-28 192714.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2024 14:13:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/geoevent-poll-an-external-website-for-json/m-p/1401957#M4154</guid>
      <dc:creator>RipaliBatra</dc:creator>
      <dc:date>2024-03-28T14:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: GeoEvent-Poll an External Website for JSON</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/geoevent-poll-an-external-website-for-json/m-p/1401969#M4155</link>
      <description>&lt;P&gt;Try putting "data" in the JSON object name parameter of the input connector.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Gene_Sipes_0-1711636487751.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/99326iE85571633CC8DE05/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Gene_Sipes_0-1711636487751.png" alt="Gene_Sipes_0-1711636487751.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2024 14:35:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/geoevent-poll-an-external-website-for-json/m-p/1401969#M4155</guid>
      <dc:creator>Gene_Sipes</dc:creator>
      <dc:date>2024-03-28T14:35:15Z</dc:date>
    </item>
    <item>
      <title>Re: GeoEvent-Poll an External Website for JSON</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/geoevent-poll-an-external-website-for-json/m-p/1402517#M4156</link>
      <description>&lt;P&gt;Thanks for your reply&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/600731"&gt;@Gene_Sipes&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have already configured JSON Object Name with "data" for my case and therefore it is returning the properties correctly which are inside the "data" JSON. But&amp;nbsp; for the nested json the response is not correctly mapped. Eg:- In the below api response sample, properties such as iaqi, attributions are not correctly mapped.&lt;/P&gt;&lt;P&gt;&lt;A href="https://api.waqi.info/feed/lucknow/?token=fa73462a52dbbb8848d20a0554fb72424af90975" target="_blank"&gt;api.waqi.info/feed/lucknow/?token=fa73462a52dbbb8848d20a0554fb72424af90975&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Can you please help me on this?&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2024 07:31:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/geoevent-poll-an-external-website-for-json/m-p/1402517#M4156</guid>
      <dc:creator>RipaliBatra</dc:creator>
      <dc:date>2024-03-29T07:31:04Z</dc:date>
    </item>
    <item>
      <title>Re: GeoEvent-Poll an External Website for JSON</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/geoevent-poll-an-external-website-for-json/m-p/1402568#M4158</link>
      <description>&lt;P&gt;This might be worth a read, hopefully it helps:&lt;BR /&gt;&lt;A href="https://community.esri.com/t5/arcgis-geoevent-server-blog/json-data-structures-working-with-hierarchy-and/ba-p/889509#U889509" target="_blank"&gt;https://community.esri.com/t5/arcgis-geoevent-server-blog/json-data-structures-working-with-hierarchy-and/ba-p/889509#U889509&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Also, I have a JSON feed with multi-cardinality structure, albeit a simple one, but in the input definition the property with multi-cardinality looks like that below. Maybe you can adjust your definition similarly. It's the rental uris.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Gene_Sipes_0-1711718978440.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/99427iFAE5EE2034EECEC0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Gene_Sipes_0-1711718978440.png" alt="Gene_Sipes_0-1711718978440.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2024 13:31:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/geoevent-poll-an-external-website-for-json/m-p/1402568#M4158</guid>
      <dc:creator>Gene_Sipes</dc:creator>
      <dc:date>2024-03-29T13:31:02Z</dc:date>
    </item>
    <item>
      <title>Re: GeoEvent-Poll an External Website for JSON</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/geoevent-poll-an-external-website-for-json/m-p/1410295#M4170</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/600731"&gt;@Gene_Sipes&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I have validated the multi-cardinality structure, but not sure why nested json properties are still not correctly mapped.&lt;/P&gt;&lt;P&gt;Consider the "attributions" (for example ) in the api response, it does not even map url ,name and logo.I tried multiple ways to map it out but no luck&lt;/P&gt;&lt;P&gt;&lt;A href="https://api.waqi.info/feed/lucknow/?token=fa73462a52dbbb8848d20a0554fb72424af90975" target="_blank" rel="noopener"&gt;api.waqi.info/feed/lucknow/?token=fa73462a52dbbb8848d20a0554fb72424af90975&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GE1.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/101039i74CD014A034AFE1A/image-size/large?v=v2&amp;amp;px=999" role="button" title="GE1.png" alt="GE1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GE2.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/101036i034FFBCE2B0B2DF5/image-size/large?v=v2&amp;amp;px=999" role="button" title="GE2.png" alt="GE2.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GE3.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/101037iA4065A26EBBC7CA7/image-size/large?v=v2&amp;amp;px=999" role="button" title="GE3.png" alt="GE3.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2024 15:23:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/geoevent-poll-an-external-website-for-json/m-p/1410295#M4170</guid>
      <dc:creator>RipaliBatra</dc:creator>
      <dc:date>2024-04-16T15:23:23Z</dc:date>
    </item>
    <item>
      <title>Re: GeoEvent-Poll an External Website for JSON</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/geoevent-poll-an-external-website-for-json/m-p/1414716#M4173</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/693794"&gt;@RipaliBatra&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try changing the group cardinality from many to one?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Gene_Sipes_1-1713966829785.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/101988iB73F35AD9E2BAAFF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Gene_Sipes_1-1713966829785.png" alt="Gene_Sipes_1-1713966829785.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2024 13:54:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/geoevent-poll-an-external-website-for-json/m-p/1414716#M4173</guid>
      <dc:creator>Gene_Sipes</dc:creator>
      <dc:date>2024-04-24T13:54:00Z</dc:date>
    </item>
    <item>
      <title>Re: GeoEvent-Poll an External Website for JSON</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/geoevent-poll-an-external-website-for-json/m-p/1417888#M4174</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/693794"&gt;@RipaliBatra&lt;/a&gt;&amp;nbsp;--&lt;/P&gt;&lt;P&gt;Given the rich hierarchical structure of the JSON you are receiving from the&amp;nbsp;&lt;A href="https://waqi.info" target="_blank"&gt;https://waqi.info&lt;/A&gt;&amp;nbsp;web service you really cannot rely on the&amp;nbsp;&lt;EM&gt;GeoEvent Sampler&lt;/EM&gt; for a good representation of the data. The sampler struggles when given complex hierarchical JSON.&lt;/P&gt;&lt;P&gt;A better approach is to create one or more&amp;nbsp;&lt;EM&gt;Write to a JSON File&lt;/EM&gt;&amp;nbsp;outputs and use them to log the event records emitted from different processors along your configured event processing workflow.&lt;/P&gt;&lt;P&gt;I have a GeoEvent Server 11.1 deployment that I used to test your feed. I was able to allow a&amp;nbsp;&lt;EM&gt;Receive JSON on a REST Endpoint&lt;/EM&gt; input to generate a GeoEvent Definition for me. A sample of the data I sent to my GeoEvent Server input and the generated GeoEvent Definition are shown below {Fig 1] and [Fig 2]. Note that I specified the input use&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/EM&gt; as the root of the JSON structure when adapting the received JSON.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RJSunderman_2-1714609944534.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/102766i9B5208896F02ABB5/image-size/large?v=v2&amp;amp;px=999" role="button" title="RJSunderman_2-1714609944534.png" alt="RJSunderman_2-1714609944534.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RJSunderman_3-1714609956345.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/102767i0912F5D782A17294/image-size/large?v=v2&amp;amp;px=999" role="button" title="RJSunderman_3-1714609956345.png" alt="RJSunderman_3-1714609956345.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Note:&amp;nbsp; Be careful when relying on auto-generated GeoEvent Definitions. An input will make its "best guess" as to what the GeoEvent Definition ought to be based on the first data record it receives. But the generated event definition will often use&amp;nbsp;&lt;EM&gt;Double&lt;/EM&gt; for data values received as epoch long integer values (for example). You have to review the generated GeoEvent Definition and verify that each array and element will be adapted properly for the data you expect to receive.&lt;/P&gt;&lt;P&gt;I was able to configure a&amp;nbsp;&lt;EM&gt;Field Mapper&lt;/EM&gt; to pull specific values out of the hierarchical JSON:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RJSunderman_4-1714610151074.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/102768i60FBAC5420BC5AED/image-size/large?v=v2&amp;amp;px=999" role="button" title="RJSunderman_4-1714610151074.png" alt="RJSunderman_4-1714610151074.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Note the expressions being used to access the data:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Attributions&lt;/STRONG&gt; is an array, so we have to provide the index of the element we want to access from that array.&amp;nbsp;&lt;STRONG&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif" size="2"&gt;attributions[1].name&lt;/FONT&gt;&lt;/STRONG&gt; accesses the second element in the array, the one with the named string &lt;STRONG&gt;&lt;FONT color="#008000"&gt;"World Air Quality Index Project"&lt;/FONT&gt;&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;City&lt;/STRONG&gt; is the name of an element, so we do not access it with ordinal values like we do when accessing the array. &lt;STRONG&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif" size="2"&gt;city.name&lt;/FONT&gt;&lt;/STRONG&gt; is sufficient to retrieve the string &lt;FONT color="#008000"&gt;&lt;STRONG&gt;"B R Ambedkar University, Lucknow, India"&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;The latitude and longitude coordinates in the city element, however, are in an array nested within an element. When pulling these as separate values we have to specify their ordinal positions in the array:&lt;UL&gt;&lt;LI&gt;The latitude is&amp;nbsp;&lt;STRONG&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif" size="2"&gt;city.geo[0]&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;The longitude is&amp;nbsp;&lt;STRONG&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif" size="2"&gt;city.geo[1]&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;The iaqi values are grouped within an element. Accessing them is fairly straightforward:&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif" size="2"&gt;iaqi.co.v&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif" size="2"&gt;iaqi.no2.v&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif" size="2"&gt;iaqi.pm10.v&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif" size="2"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;In my&amp;nbsp;&lt;EM&gt;Field Mapper&lt;/EM&gt; illustration I only pulled the string for the "day", but if we wanted to be a little more creative we could build a string from available values for a given day. The string value&amp;nbsp;&lt;STRONG&gt;&lt;FONT color="#008000"&gt;"Day: 2024-05-01 (Avg/Min/Max: 29.0 / 14.0 / 50.0)"&lt;/FONT&gt;&lt;/STRONG&gt; could be build using the following expression to pull individual values and append them together -- taking care to use the toString( ) function to explicitly cast&amp;nbsp;&lt;EM&gt;Double&lt;/EM&gt; values to&amp;nbsp;&lt;EM&gt;String&lt;/EM&gt; values when appending them to literal strings:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif" size="2"&gt;'Day: ' + toString(forecast.daily.o3[2].day) + ' (Avg/Min/Max: ' + toString(forecast.daily.o3[2].avg) + ' / ' + toString(forecast.daily.o3[2].min) + ' / ' + toString(forecast.daily.o3[2].max) +')'&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Because the daily forecast values for "o3", "pm10", and "pm25" all have the same elemental structure you will&amp;nbsp;&lt;EM&gt;&lt;U&gt;not&lt;/U&gt;&lt;/EM&gt; be able to use a&amp;nbsp;&lt;EM&gt;Multicardinal Field Splitter&lt;/EM&gt; processor to collapse or flatten these three arrays.&amp;nbsp; It looks like these arrays are allowed to contain a variable number of items. The array&amp;nbsp;&lt;STRONG&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif" size="2"&gt;o3&lt;/FONT&gt;&lt;/STRONG&gt; has 8 elements whereas the arrays&amp;nbsp;&lt;STRONG&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif" size="2"&gt;pm10&lt;/FONT&gt;&lt;/STRONG&gt; and &lt;STRONG&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif" size="2"&gt;pm25&lt;/FONT&gt;&lt;/STRONG&gt; both have 9 elements. There is no iterator or looping mechanism available in any of GeoEvent Server's processors, so you will very likely have to stick with extracting essential information from the JSON using field calculation expressions like I show above.&lt;/P&gt;&lt;P&gt;Hope this information helps, and a special&amp;nbsp;&lt;EM&gt;Thank You&lt;/EM&gt; to&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/600731"&gt;@Gene_Sipes&lt;/a&gt;&amp;nbsp;for jumping in to help with this complicated hierarchical JSON.&lt;/P&gt;&lt;P&gt;-- RJ&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2024 01:16:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/geoevent-poll-an-external-website-for-json/m-p/1417888#M4174</guid>
      <dc:creator>RJSunderman</dc:creator>
      <dc:date>2024-05-02T01:16:11Z</dc:date>
    </item>
    <item>
      <title>Re: GeoEvent-Poll an External Website for JSON</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/geoevent-poll-an-external-website-for-json/m-p/1418053#M4176</link>
      <description>&lt;P&gt;Always love your explainers! Thanks for jumping in&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/115391"&gt;@RJSunderman&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2024 13:30:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/geoevent-poll-an-external-website-for-json/m-p/1418053#M4176</guid>
      <dc:creator>Gene_Sipes</dc:creator>
      <dc:date>2024-05-02T13:30:03Z</dc:date>
    </item>
  </channel>
</rss>

