akarsh
2 years agoNew Contributor III
Filter Single attribute from JSON list to use it in a like query
My Input looks like this. { "totalCount": 4, "dataList": [ { "IfaNumber": "1", "alink": "", "agroupId": "" }, { "IfaNumber": "2", "alink": "", "agroupId": "" }, { "IfaNumber": "3", "...
- 2 years ago
Hello akarsh,
You can try with the following expression in a Mapper Snap:
$dataList.map(x => x.IfaNumber).filter((x,ind,arr) => arr.indexOf(x) == ind)
This expression, first maps only the IfaNumber values from the dataList array, then filters out the duplicates.
Attaching the sample pipeline below.
Let me know if this helps you!
Regards,
Aleksandar.