I have a jstree. I want to select the node which is bound to the object which has a location with id of 158. This works but seems stupid. What\'s the more idiomatic way of doing
I did it with:
$('.jstree').jstree(true).select_node('element id');
this code:
jQuery.each(produto.categorias, function(i, categoria) { $('#lista-categorias').jstree(true).select_node(categoria.dadoCategoria.id); });