Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
[string]	asJSON([string] xml) // convert aan xml string to json string

...

Code Block
languagejs
var myXml=http.get("https://www.w3schools.com/XML/note.xml");
var myJson=JSON.parse(xml.asJSON(myXml));

var from=myJson.note.from;
var to=myJson.note.to;
out.table(["from","to"],[[from,to]]);

Output:

fromto
JaniTove