3
I’m using the linqJs
When I try to get the id 5512
he returns null
, but when I catch the 124
, works.
$.Enumerable.From(structure).Where("$.id==5512").ToArray();
Object structure:
[{
"id": 124,
"text": "Pai",
"children": [
{
"id": 5511,
"text": "Filho 1"
},
{
"id": 5512,
"text": "Filho 2"
}
]
}]
How do I find the ID regardless of the position it is in? In this case the 5512
I guess maybe I could do
$.children.id
but the array is dynamic so no I have to know the exact position, so I’d like to search at allid