Forum Discussion
2 Replies
- jcorneliusNew Contributor III
@nikola.k.popovski you could use a Find() which would return all the objects with group1.length==0, then see how many there are or process then ie $test.Find(data->data.group1.length==0)
- bojanvelevskiValued Contributor
Since you have multiple objects in the test array, you’ll need to check every object separately. Mapping an additional field or replacing the object with a value that states if the group1 is empty is the way to go.
$test.map(x=>x.extend({"groupLength":x.group1.length})