How to extract value in multiple collection

Hi… this my 1st post to Make Community.

I already read all post related to my problem. And i still can not understand which solution is for me. Is it iterator, json parse, map etc.

My idea is to create filter which is name of segment (which i get form Mautic’s Segment) not equal to iRealty Warriors, then proceed to next module.

So my problem is i can not get value of segment to compare in condition field.

Here i attached files related to my question.

Thanks in advance

Output in JSON

[
{
“body”: {
“total”: 3,
“lists”: {
“17”: {
“id”: 17,
“name”: “iRealty Warriors”,
“alias”: “irealty-warriors”,
“dateAdded”: “2024-02-05T17:11:17+00:00”,
“manuallyRemoved”: false,
“manuallyAdded”: true
},
“18”: {
“id”: 18,
“name”: “Team Leader iRealty”,
“alias”: “team-leader-irealty”,
“dateAdded”: “2024-02-06T07:40:37+00:00”,
“manuallyRemoved”: false,
“manuallyAdded”: true
},
“23”: {
“id”: 23,
“name”: “Warriors Batch 4 (6211)”,
“alias”: “warriors-batch-4-6211”,
“dateAdded”: “2024-02-05T22:23:56+00:00”,
“manuallyRemoved”: false,
“manuallyAdded”: false
}
}
},
“headers”: {
“date”: “Tue, 13 Feb 2024 20:13:19 GMT”,
“content-type”: “application/json”,
“content-length”: “499”,
“connection”: “close”,
“server”: “XX”,
“vary”: “Authorization”,
“mautic-version”: “4.4.9”,
“cache-control”: “max-age=0, must-revalidate, private”,
“expires”: “Tue, 13 Feb 2024 20:13:19 GMT”
},
“statusCode”: 200
}
]

Screenshot 2024-02-14 at 3.51.47 AM


sorry. this my 2nd post to Make Community

No worries, you are always welcome to the Make community even if it’s not your first post :slight_smile:

It looks like the data is not an array, so you can try putting this into an Iterator module first

{{ toArray(8.body.lists) }}

2 Likes

thanks for your reply.

Use Iterator like this?

and the output is

so how to use Segment name in filter condition?

Now you can access name of segment in the Value.

2 Likes

how to take Segment value?

{{36.value.name}}

2 Likes