Answer the question
In order to leave comments, you need to log in
How to pass object to json file?
Parsed the page and assembled an object from the ul > li elements. I launched my script in the browser through the developer panel, worked correctly, and now I have all the data I need in the object.
An object of this type:
var obj = {
title : {
name : {
value : value,
}
}
title : {
name : {
value : value,
}
}
}
Answer the question
In order to leave comments, you need to log in
var a = document.createElement('a');
a.download = 'file_name.json';
var oUrl = URL.createObjectURL(new Blob([JSON.stringify(YOUR_JSON)], {type: 'application/octet-stream'}));
a.href = oUrl;
a.click();
delete a;
URL.revokeObjectURL(oUrl);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question