I am trying to get all the nodes with their levels, I mean that when the tree is completely loaded I want to get the node's levels of all of them.
I tried to do this:
var idList = [];
var jsonNodes = $('#albero').jstree(true).get_json('#', { flat: true });
$.each(jsonNodes, function (i, val) {
idList.push($(val).attr('id'));
});
But it gives me the level of the selected node, not all of them. My Tree looks like this: