dd_snaplogic
3 years agoNew Contributor II
How to check object exists in an array
I have an array eg
{
“groupBy”: {
“rowKey”: “0141116963814”
},
“group”: [
{
“rowKey”: “0141116963814”
},
{
“rowKey”: “0141116963814”
},
{
“rowKey”: “0141116963814”
}
] ...
- 3 years ago
You need to put $group[6], inside quotes like $.hasPath(“$group[6]”), if there is no item at index 6 in the group array, this expression will return false.
Cheers,