Hi Brendan – The new feature you added on the preference UI. Can I access JSON files using the Utils.getJsonFromUrl
function? I was trying the following syntx, but it was not working for me. Could you send me a snipet of code on how to use this new feature?
let response = Utils.getJsonFromUrl('/Users/alfredojmachado/Documents/sample.json')
console.log(JSON.stringify(response,null,4));
thanks,
rocky
Hi Rocky,
The URL you’ve specified is not a valid URL syntax.
You would need to use:
let response = Utils.getJsonFromUrl('file:///Users/alfredojmachado/Documents/sample.json')
Try that and see if it works. You always need to have a scheme specified for a URL. Whether it’s file://
or https://
, tapformz://
, and so on.
Thanks,
Brendan
That worked. ! I didn’t even think about adding the “file://” makes sense. Thanks again