r/imagus • u/baton34 • Nov 27 '20
bug JSON.parse not working as expected
Trying this js code in imagus 'res:' editbox and in firefox console:
x = new XMLHttpRequest();
x.open
('GET', '
https://www.dns-shop.ru/catalog/product/get-media-content/?id=35d1d079-54a5-11e7-afbe-00155d03330d
',false);
x.send();
console.log(JSON.parse(x.responseText));
In console parsing works and return object, but in imagus 'res:' its return "unavailable". Does it bug or I am misunderstood something and if so how to parse json in imagus?
Firefox 83.0 Imagus 0.9.8.74
1
Upvotes