Forum Discussion

dd_snaplogic's avatar
dd_snaplogic
New Contributor II
3 years ago
Solved

How to check object exists in an array

I have an array eg { “groupBy”: { “rowKey”: “0141116963814” }, “group”: [ { “rowKey”: “0141116963814” }, { “rowKey”: “0141116963814” }, { “rowKey”: “0141116963814” } ] ...
  • Abhishek_Soni37's avatar
    Abhishek_Soni37
    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,