I have this array:
[
{
elements: [
{ id: '123', field: 'value' }
{ id: '456', field: 'value' }
]
}
{
elements: [
{ id: '789', field: 'value' }
]
}
]
Now I need to get the index of the first level object searching by an id:
searching for id = '456' should give me 0, id = '789' should give me 1
idof the first item in yourelementsarrays ?