7 ms·
Umm. I have no clue how you can say this. In JavaScript, JSON is unquestionably the easiest format to use. It may or may not be the same to parse, say, JSON an
by bwy 11y ago
Umm. I have no clue how you can say this. In JavaScript, JSON is unquestionably the easiest format to use.
It may or may not be the same to parse, say, JSON and XML.
But how is
xmlDoc=new DOMParser().parseFromString(booksXml);
newatt=xmlDoc.createAttribute("edition");
newatt.nodeValue="first";
x=xmlDoc.getElementsByTagName("title");
x[0].setAttributeNode(newatt);
as easy to use as
JSON.parse(booksJson).title.edition = 'first'
?