Answers for "loop through json array and get key name"

0

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);
Posted by: Guest on August-16-2020

Code answers related to "loop through json array and get key name"

Code answers related to "Javascript"

Browse Popular Code Answers by Language