<?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: How do I set a variable to the contents of a &amp;quot;.json&amp;quot; file? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-set-a-variable-to-the-contents-of-a-quot/m-p/348251#M32184</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://dojotoolkit.org/reference-guide/dojo/text.html"&gt;dojo/text&lt;/A&gt;​ - This is the documentation for what &lt;A href="https://community.esri.com/migrated-users/3101"&gt;Robert Scheitlin, GISP&lt;/A&gt;​ mentioned.&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse"&gt;JSON.parse()&lt;/A&gt;​ - Use this to convert the results from dojo/text into a JavaScript object.&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Apr 2016 23:55:27 GMT</pubDate>
    <dc:creator>JeffJacobson</dc:creator>
    <dc:date>2016-04-11T23:55:27Z</dc:date>
    <item>
      <title>How do I set a variable to the contents of a ".json" file?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-set-a-variable-to-the-contents-of-a-quot/m-p/348249#M32182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Very new to coding...I am trying to set a variable to the contents of an external ".json" file. It contains an array. I can't figure out how to reference the file correctly in html/javascript and set the variable simply to the array. Thanks for any advise.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2016 21:10:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-set-a-variable-to-the-contents-of-a-quot/m-p/348249#M32182</guid>
      <dc:creator>JoshuaMcCurry</dc:creator>
      <dc:date>2016-04-11T21:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: How do I set a variable to the contents of a ".json" file?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-set-a-variable-to-the-contents-of-a-quot/m-p/348250#M32183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Joshua,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Sure just use 'dojo/text!pathyourjsonfile.json' in your apps require statements and then use the assigned parameter (i.e. myJson) to access it in your code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2016 21:36:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-set-a-variable-to-the-contents-of-a-quot/m-p/348250#M32183</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-04-11T21:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: How do I set a variable to the contents of a ".json" file?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-set-a-variable-to-the-contents-of-a-quot/m-p/348251#M32184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://dojotoolkit.org/reference-guide/dojo/text.html"&gt;dojo/text&lt;/A&gt;​ - This is the documentation for what &lt;A href="https://community.esri.com/migrated-users/3101"&gt;Robert Scheitlin, GISP&lt;/A&gt;​ mentioned.&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse"&gt;JSON.parse()&lt;/A&gt;​ - Use this to convert the results from dojo/text into a JavaScript object.&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2016 23:55:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-set-a-variable-to-the-contents-of-a-quot/m-p/348251#M32184</guid>
      <dc:creator>JeffJacobson</dc:creator>
      <dc:date>2016-04-11T23:55:27Z</dc:date>
    </item>
  </channel>
</rss>

