Continuing the discussion from Check array is empty or not:
$group.map(o=> o.values().length ).reduce((a, b) => a + b, 0)
When incoming JSON… starting from root? Kindly share the JSON schema
e.g.
[
{ "group": {
"key1": "a",
"key2": "b",
"other": 100
},
{ "group": {
}
},
{ "group": {
"key4": "",
"key5": ""
}
}
]
$group.values().join(‘’).trim().length > 0