Hi everyone,
I'm trying to stream real-time data for flights using GeoEvent Server. The format of the response is JSON, so I used Poll an External Website for JSON input connector. However, I'm not able to parse the data properly. The format of the response is like below:
<SPAN class="punctuation token">{</SPAN>
<SPAN class="string token">"time"</SPAN><SPAN class="operator token">:</SPAN> <SPAN class="number token">1564084010</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"states"</SPAN><SPAN class="operator token">:</SPAN> <SPAN class="punctuation token">[</SPAN>
<SPAN class="punctuation token">[</SPAN><SPAN class="string token">"ac96b8"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="operator token">-</SPAN><SPAN class="number token">90.3411</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="number token">39.6066</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="number token">10972.8</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="punctuation token">[</SPAN><SPAN class="string token">"ae1fa3"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="operator token">-</SPAN><SPAN class="number token">105.3463</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="number token">38.4699</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="number token">2026.92</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="punctuation token">[</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="punctuation token">]</SPAN>
<SPAN class="punctuation token">]</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>The response comprises two attributes: time and states. States is a 2D array that has data for icao24, longitude and latitude.
I have already read the post https://community.esri.com/community/gis/enterprise-gis/geoevent/blog/2018/07/25/json-data-structures-working-with-hierarchy-and-multicardinality?sr=search&searchId=9cfbd808-6002-43b6-a1f7-2022feeb7724&searchIndex=0 written
by RJ Sunderman but my problem is that the states array does not have the attribute names, but only attribute values. I was just wondering if there is a way to parse this data in GeoEvent (probably using index of values
instead of attribute name)? Thank you for your help.