Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

loop through json array and get key name

function iterateNodes(data) {
    for (var i = 0, l = data.nodes.length; i < l; i++) {
        var node = data.nodes[i];

        console.log(node.name);

        if (node.nodes) {
            arguments.callee(node);
        }
    }
}

iterateNodes(data);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #loop #json #array #key
ADD COMMENT
Topic
Name
5+7 =