<?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 How to populate pop-up using Arcade and attribute containing JSON text in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/how-to-populate-pop-up-using-arcade-and-attribute/m-p/1677451#M7666</link>
    <description>&lt;P&gt;I am using an attribute field to store the JSON output result of an API call. I want to use the JSON content to populate information in a pop-up for a web map using Arcade with ArcGIS Online.&amp;nbsp;&lt;/P&gt;&lt;P&gt;A little background. I have a python script that uses `requests` to make an API call to our city's 311 service. The resulting JSON response is stored in a field of a hosted feature service named 'Comments'. These are comments made by the public or city workers who are responding to 311 calls.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to use Arcade to convert the contents of the field to a Dictionary or Array, but I am having no luck. Here is sample dictionary of a text string from the Comments field:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;[{'date': '2025-12-29', 'comment': 'Code Enforcement has received your service request (#CRM-25001496).', 'visibility': 'Public'}, {'date': '2025-12-29', 'comment': 'This issue was recategorized from Unsafe Sidewalks or Rights-Of-Way to Encampment Activity.', 'visibility': 'Public'}, {'date': '2025-12-29', 'comment': '7 day notice posted. Reporting party has been notified. ', 'visibility': 'Public'}, {'date': '2025-12-29', 'comment': 'CRM-25001496 on CentralSquare Community Development abandoned and now managed on SeeClickFix due to recategorization.', 'visibility': 'Internal'}, {'date': '2025-12-30', 'comment': 'CWB Street Outreach was able to make contact and provide resources and information to individuals', 'visibility': 'Public'}, {'date': '2025-12-30', 'comment': 'CWB Street Outreach was able to make contact and provide resources and information to individuals ', 'visibility': 'Internal'}, {'date': '2026-01-06', 'comment': 'We have completed your request. Thank you for your submission.', 'visibility': 'Public'}]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;In the following Arcade script I am not able to pull any information from the Comments field of the feature:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;/*Basic returns for targeting keys in dictionary list from FEATURE&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-------------------------------------------------------------------------*/&lt;/SPAN&gt;&lt;BR /&gt;var comments = $feature.Comments&lt;BR /&gt;&lt;SPAN&gt;return comments[0].date&lt;/SPAN&gt;&lt;BR /&gt;// returns &lt;SPAN&gt;Test execution error: Execution error - Cannot access value using a key of this type. Verify test data.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;BR /&gt;return comments[0].comment&lt;/SPAN&gt;&lt;BR /&gt;// returns &lt;SPAN&gt;Test execution error: Execution error - Cannot access value using a key of this type. Verify test data.&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;However, if I name a variable that contains the contents of the Comment without populating from a field, I have no issues accessing keys in the dictionary:&lt;/P&gt;&lt;PRE&gt;var comments =&amp;nbsp;&lt;SPAN&gt;[{'date': '2025-12-29', 'comment': 'Code Enforcement has received your service request (#CRM-25001496).', 'visibility': 'Public'}, {'date': '2025-12-29', 'comment': 'This issue was recategorized from Unsafe Sidewalks or Rights-Of-Way to Encampment Activity.', 'visibility': 'Public'}, {'date': '2025-12-29', 'comment': '7 day notice posted. Reporting party has been notified. ', 'visibility': 'Public'}, {'date': '2025-12-29', 'comment': 'CRM-25001496 on CentralSquare Community Development abandoned and now managed on SeeClickFix due to recategorization.', 'visibility': 'Internal'}, {'date': '2025-12-30', 'comment': 'CWB Street Outreach was able to make contact and provide resources and information to individuals', 'visibility': 'Public'}, {'date': '2025-12-30', 'comment': 'CWB Street Outreach was able to make contact and provide resources and information to individuals ', 'visibility': 'Internal'}, {'date': '2026-01-06', 'comment': 'We have completed your request. Thank you for your submission.', 'visibility': 'Public'}]&lt;/SPAN&gt;&lt;/PRE&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;/*Basic returns for targeting keys in dictionary list from VARIABLE&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-------------------------------------------------------------------------*/&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;comments&lt;/SPAN&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;].&lt;/SPAN&gt;&lt;SPAN&gt;date&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// returns&amp;nbsp;&lt;SPAN class=""&gt;text:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;"2025-12-29"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;return&lt;SPAN&gt;&amp;nbsp;comments&lt;/SPAN&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;].&lt;/SPAN&gt;&lt;SPAN&gt;comment&lt;BR /&gt;&lt;/SPAN&gt;// returns&amp;nbsp;&lt;SPAN class=""&gt;text:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Code Enforcement has received your service request (#CRM-25001496)."&lt;/SPAN&gt;&lt;/PRE&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;I have read in other forums that&amp;nbsp; API calls are not possible from inside Arcade for web map pop-ups. So I am trying to create a work around where Arcade can read the JSON response from the 'Comments' field. I am not sure why these two scripts create a different result if the content of the Comment is identical. Any ideas for a better work-around or a Arcade solution are appreciated&lt;/P&gt;</description>
    <pubDate>Tue, 13 Jan 2026 03:50:27 GMT</pubDate>
    <dc:creator>aolson</dc:creator>
    <dc:date>2026-01-13T03:50:27Z</dc:date>
    <item>
      <title>How to populate pop-up using Arcade and attribute containing JSON text</title>
      <link>https://community.esri.com/t5/developers-questions/how-to-populate-pop-up-using-arcade-and-attribute/m-p/1677451#M7666</link>
      <description>&lt;P&gt;I am using an attribute field to store the JSON output result of an API call. I want to use the JSON content to populate information in a pop-up for a web map using Arcade with ArcGIS Online.&amp;nbsp;&lt;/P&gt;&lt;P&gt;A little background. I have a python script that uses `requests` to make an API call to our city's 311 service. The resulting JSON response is stored in a field of a hosted feature service named 'Comments'. These are comments made by the public or city workers who are responding to 311 calls.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to use Arcade to convert the contents of the field to a Dictionary or Array, but I am having no luck. Here is sample dictionary of a text string from the Comments field:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;[{'date': '2025-12-29', 'comment': 'Code Enforcement has received your service request (#CRM-25001496).', 'visibility': 'Public'}, {'date': '2025-12-29', 'comment': 'This issue was recategorized from Unsafe Sidewalks or Rights-Of-Way to Encampment Activity.', 'visibility': 'Public'}, {'date': '2025-12-29', 'comment': '7 day notice posted. Reporting party has been notified. ', 'visibility': 'Public'}, {'date': '2025-12-29', 'comment': 'CRM-25001496 on CentralSquare Community Development abandoned and now managed on SeeClickFix due to recategorization.', 'visibility': 'Internal'}, {'date': '2025-12-30', 'comment': 'CWB Street Outreach was able to make contact and provide resources and information to individuals', 'visibility': 'Public'}, {'date': '2025-12-30', 'comment': 'CWB Street Outreach was able to make contact and provide resources and information to individuals ', 'visibility': 'Internal'}, {'date': '2026-01-06', 'comment': 'We have completed your request. Thank you for your submission.', 'visibility': 'Public'}]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;In the following Arcade script I am not able to pull any information from the Comments field of the feature:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;/*Basic returns for targeting keys in dictionary list from FEATURE&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-------------------------------------------------------------------------*/&lt;/SPAN&gt;&lt;BR /&gt;var comments = $feature.Comments&lt;BR /&gt;&lt;SPAN&gt;return comments[0].date&lt;/SPAN&gt;&lt;BR /&gt;// returns &lt;SPAN&gt;Test execution error: Execution error - Cannot access value using a key of this type. Verify test data.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;BR /&gt;return comments[0].comment&lt;/SPAN&gt;&lt;BR /&gt;// returns &lt;SPAN&gt;Test execution error: Execution error - Cannot access value using a key of this type. Verify test data.&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;However, if I name a variable that contains the contents of the Comment without populating from a field, I have no issues accessing keys in the dictionary:&lt;/P&gt;&lt;PRE&gt;var comments =&amp;nbsp;&lt;SPAN&gt;[{'date': '2025-12-29', 'comment': 'Code Enforcement has received your service request (#CRM-25001496).', 'visibility': 'Public'}, {'date': '2025-12-29', 'comment': 'This issue was recategorized from Unsafe Sidewalks or Rights-Of-Way to Encampment Activity.', 'visibility': 'Public'}, {'date': '2025-12-29', 'comment': '7 day notice posted. Reporting party has been notified. ', 'visibility': 'Public'}, {'date': '2025-12-29', 'comment': 'CRM-25001496 on CentralSquare Community Development abandoned and now managed on SeeClickFix due to recategorization.', 'visibility': 'Internal'}, {'date': '2025-12-30', 'comment': 'CWB Street Outreach was able to make contact and provide resources and information to individuals', 'visibility': 'Public'}, {'date': '2025-12-30', 'comment': 'CWB Street Outreach was able to make contact and provide resources and information to individuals ', 'visibility': 'Internal'}, {'date': '2026-01-06', 'comment': 'We have completed your request. Thank you for your submission.', 'visibility': 'Public'}]&lt;/SPAN&gt;&lt;/PRE&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;/*Basic returns for targeting keys in dictionary list from VARIABLE&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-------------------------------------------------------------------------*/&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;comments&lt;/SPAN&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;].&lt;/SPAN&gt;&lt;SPAN&gt;date&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// returns&amp;nbsp;&lt;SPAN class=""&gt;text:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;"2025-12-29"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;return&lt;SPAN&gt;&amp;nbsp;comments&lt;/SPAN&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;].&lt;/SPAN&gt;&lt;SPAN&gt;comment&lt;BR /&gt;&lt;/SPAN&gt;// returns&amp;nbsp;&lt;SPAN class=""&gt;text:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Code Enforcement has received your service request (#CRM-25001496)."&lt;/SPAN&gt;&lt;/PRE&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;I have read in other forums that&amp;nbsp; API calls are not possible from inside Arcade for web map pop-ups. So I am trying to create a work around where Arcade can read the JSON response from the 'Comments' field. I am not sure why these two scripts create a different result if the content of the Comment is identical. Any ideas for a better work-around or a Arcade solution are appreciated&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jan 2026 03:50:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/how-to-populate-pop-up-using-arcade-and-attribute/m-p/1677451#M7666</guid>
      <dc:creator>aolson</dc:creator>
      <dc:date>2026-01-13T03:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to populate pop-up using Arcade and attribute containing JSON text</title>
      <link>https://community.esri.com/t5/developers-questions/how-to-populate-pop-up-using-arcade-and-attribute/m-p/1677452#M7667</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/740655"&gt;@aolson&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;Arcade treats the field data as a raw String, whereas your hardcoded variable is interpreted as a live Object. You need to wrap your field attribute in the FromJSON() function to convert that text into a searchable dictionary.&lt;/P&gt;&lt;P&gt;You can try the code below and it should work.&lt;BR /&gt;&lt;SPAN class=""&gt;var&lt;/SPAN&gt; comments = FromJSON($feature.Comments);&lt;BR /&gt;&lt;SPAN class=""&gt;return&lt;/SPAN&gt; comments[&lt;SPAN class=""&gt;0&lt;/SPAN&gt;].comment;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jan 2026 04:09:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/how-to-populate-pop-up-using-arcade-and-attribute/m-p/1677452#M7667</guid>
      <dc:creator>VenkataKondepati</dc:creator>
      <dc:date>2026-01-13T04:09:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to populate pop-up using Arcade and attribute containing JSON text</title>
      <link>https://community.esri.com/t5/developers-questions/how-to-populate-pop-up-using-arcade-and-attribute/m-p/1677550#M7668</link>
      <description>&lt;P&gt;The problem you're running into is the comments attribute in your feature is a text string and not JSON text.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;"[{'date': '2025-12-29', 'comment': 'Code Enforcement has received your service request (#CRM-25001496).', 'visibility': 'Public'}, {'date': '2025-12-29', 'comment': 'This issue was recategorized from Unsafe Sidewalks or Rights-Of-Way to Encampment Activity.', 'visibility': 'Public'}, {'date': '2025-12-29', 'comment': '7 day notice posted. Reporting party has been notified. ', 'visibility': 'Public'}, {'date': '2025-12-29', 'comment': 'CRM-25001496 on CentralSquare Community Development abandoned and now managed on SeeClickFix due to recategorization.', 'visibility': 'Internal'}, {'date': '2025-12-30', 'comment': 'CWB Street Outreach was able to make contact and provide resources and information to individuals', 'visibility': 'Public'}, {'date': '2025-12-30', 'comment': 'CWB Street Outreach was able to make contact and provide resources and information to individuals ', 'visibility': 'Internal'}, {'date': '2026-01-06', 'comment': 'We have completed your request. Thank you for your submission.', 'visibility': 'Public'}]"&lt;/LI-CODE&gt;&lt;P&gt;Regular JavaScript has the &lt;A href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse" target="_self"&gt;JSON.parse()&lt;/A&gt; method, which allows you to convert a string like that into JSON, but Arcade doesn't have that functionality.&lt;/P&gt;&lt;P&gt;Could you create a table from the API call and use that in a one-to-many relationship to get the related records for that feature?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jan 2026 16:21:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/how-to-populate-pop-up-using-arcade-and-attribute/m-p/1677550#M7668</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2026-01-13T16:21:15Z</dc:date>
    </item>
  </channel>
</rss>

