You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't figure out how to load a JSON file and access the JSON object, is it possible?
Perhaps it would be interesting to be able to code something like this?:
LoadJS uses the browser's built-in tags (<script>, <style>, <img>) to load files and as far I know you can't load JSON directly using those tags. However, you can use the jsonp method in conjunction with LoadJS if that's useful:
Client code:
window.callbackFn=function(json){console.log(json);}loadjs('/server-endpoint',function(){// server has responded and callbackFn has been called});
Thanks for your answer, in most cases it would be a good solution
(unfortunately not for me, I'm inside a tinyMce plugin dialog iFrame with TypeScript, so I'll use XMLHttpRequest instead)
Hi,
I can't figure out how to load a JSON file and access the JSON object, is it possible?
Perhaps it would be interesting to be able to code something like this?:
The text was updated successfully, but these errors were encountered: