Posts tagged as: JSON

A job interview JavaScript task – parsing XML to JSON

Some time ago I was presented with the following task: create in JSON a list of all the 2nd level nodes from an XML input and display the number of children for each such node. It sounds simple but it’s trickier than instantiating the DOMParser and then using JSON.parse (read about them at MDN).

Read More +