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.
Joshua,
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.
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.