# Filter Data from array & Associate them

**URL:** <https://community.make.com/t/filter-data-from-array-associate-them/44428>\
**Category:** Questions\
**Tags:** json\
**Created:** [July 3, 2024, 8:10am UTC](https://community.make.com/t/filter-data-from-array-associate-them/44428 "2024-07-03T08:10:26Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![hugo2](https://avatars.discourse-cdn.com/v4/letter/h/db5fbb/32.png) [@hugo2](https://community.make.com/u/hugo2)\
**Post date:** [July 3, 2024, 8:10am UTC](https://community.make.com/t/filter-data-from-array-associate-them/44428/1 "2024-07-03T08:10:26Z")

</div>

### What are you trying to achieve?

Hello Team,  
I hope you are well.

I have an issue with an automation. I want to filter the data retrieved from the “HTTP” module and then associate two data points (URL and the corresponding city) for later use.

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/0/4/04dc3897e7d7693a0613637ba554c571aaeaebc9.png)

### Steps taken so far

From the HTTP module, I parse the JSON to get structured data. Then, I set the variables I’m interested in: “City” and “URL”. After that, I use an iterator and an aggregator, followed by a filter on the desired city before sending the data to a Google Sheet.

I am able to get only the desired city. However, the URL is incorrect.

For example, if the data looks like this:

London | URL 1  
London | URL 2  
Leeds | URL 3

At the end, if I want to get “Leeds” in the sheet, I would get Leeds | URL 1.

So, I am getting the URL in the order of the data’s appearance, not connected to the city filter at all.

### Screenshots: scenario setup, module configuration, errors

[blueprint (1).json](https://community.make.com/uploads/short-url/rvuXUPyMfS2MBklH2aQ615fZOIQ.json) (33.9 KB)

---

<div class="post-metadata">

**Author:** ![Msquare\_Automation](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/msquare_automation/32/6634_2.png) [@Msquare\_Automation](https://community.make.com/u/Msquare_Automation)\
**Post date:** [July 3, 2024, 8:35am UTC](https://community.make.com/t/filter-data-from-array-associate-them/44428/2 "2024-07-03T08:35:29Z")

</div>

Hi @hugo2  
You can apply filter like this:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/f/8/f82bdffa155c838b844a10cfe24f0bc59a7c9f37.png)

Regards,  
**Msquare Automation - Gold Partner of Make**

> [Free Consultation](https://calendly.com/msquarepro/meeting) | [Live Implementation](https://calendly.com/msquarepro/msquareautomation-live)

> Visit us [here](https://www.msquare.pro/) | [Youtube Channel](https://www.youtube.com/channel/UCqidlIIwbejxZmRUWBICcjQ)

---

<div class="post-metadata">

**Author:** ![hugo2](https://avatars.discourse-cdn.com/v4/letter/h/db5fbb/32.png) [@hugo2](https://community.make.com/u/hugo2)\
**Post date:** [July 3, 2024, 12:42pm UTC](https://community.make.com/t/filter-data-from-array-associate-them/44428/3 "2024-07-03T12:42:06Z")

</div>

Hello @Msquare_Automation and ty for your reply.

I’m not sure I fully understand.

In the HTTP module, I receive events that include “City” and “URL”. In each call to the module, I receive about 500 events, each with a city name and a URL.

I want to filter these events to only get those from a specific city like “London” and retrieve the associated URL for each London event, which are different.

It seems that in your example, I need to know the URL to filter

---

<div class="post-metadata">

**Author:** ![hugo2](https://avatars.discourse-cdn.com/v4/letter/h/db5fbb/32.png) [@hugo2](https://community.make.com/u/hugo2)\
**Post date:** [July 3, 2024, 12:44pm UTC](https://community.make.com/t/filter-data-from-array-associate-them/44428/4 "2024-07-03T12:44:04Z")

</div>

For exemple, an event is like that for french example in parse json

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/7/e/7e7053c0de5c4670520824698c2ade2a57daa99f.png)

---

<div class="post-metadata">

**Author:** ![Msquare\_Automation](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/msquare_automation/32/6634_2.png) [@Msquare\_Automation](https://community.make.com/u/Msquare_Automation)\
**Post date:** [July 3, 2024, 2:47pm UTC](https://community.make.com/t/filter-data-from-array-associate-them/44428/5 "2024-07-03T14:47:28Z")

</div>

Hey @hugo2

Sorry for the confusion. You need to use get and map function for this.

get(map(YOUR\_ARRAY;URL;CITY;LONDON);1)

This works like you want url where city is london.

Regards,  
**Msquare Automation - Gold Partner of Make**

> [Free Consultation](https://calendly.com/msquarepro/meeting) | [Live Implementation](https://calendly.com/msquarepro/msquareautomation-live)

> Visit us [here](https://www.msquare.pro/) | [Youtube Channel](https://www.youtube.com/channel/UCqidlIIwbejxZmRUWBICcjQ)

---

<div class="post-metadata">

**Author:** ![hugo2](https://avatars.discourse-cdn.com/v4/letter/h/db5fbb/32.png) [@hugo2](https://community.make.com/u/hugo2)\
**Post date:** [July 3, 2024, 3:59pm UTC](https://community.make.com/t/filter-data-from-array-associate-them/44428/6 "2024-07-03T15:59:27Z")

</div>

Hey,

Oups like that

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/8/b/8b8714d5d3f965ae940300a27ababb1a466e2460.png)

---

<div class="post-metadata">

**Author:** ![samliew](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/samliew/32/13327_2.png) [@samliew](https://community.make.com/u/samliew)\
**Post date:** [July 4, 2024, 1:51am UTC](https://community.make.com/t/filter-data-from-array-associate-them/44428/7 "2024-07-04T01:51:53Z")

</div>

> [@hugo2](#):
>
> Oups like that

You are missing a semicolon `;` before the `1`

[samliew](https://samliew.com/services) – [request private consultation](https://samliew.com/request-quote?ServiceType=Automation%20Consultation&Referrer=Make)

> Join the [Make Fans](https://samliew.com/make-discord-invite) Discord server to [chat](https://samliew.com/make-discord-invite) with other makers!

---

<div class="post-metadata">

**Author:** ![hugo2](https://avatars.discourse-cdn.com/v4/letter/h/db5fbb/32.png) [@hugo2](https://community.make.com/u/hugo2)\
**Post date:** [July 4, 2024, 7:29am UTC](https://community.make.com/t/filter-data-from-array-associate-them/44428/8 "2024-07-04T07:29:29Z")

</div>

Ty ! But doesn’t change anything.

---

<div class="post-metadata">

**Author:** ![samliew](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/samliew/32/13327_2.png) [@samliew](https://community.make.com/u/samliew)\
**Post date:** [July 4, 2024, 7:32am UTC](https://community.make.com/t/filter-data-from-array-associate-them/44428/9 "2024-07-04T07:32:28Z")

</div>

Oh, looks like the condition needs to be simply this, since you are using an array operator in the filter.

```plaintext
map(ARRAY; city)

```

[samliew](https://samliew.com/services) – [request private consultation](https://samliew.com/request-quote?ServiceType=Automation%20Consultation&Referrer=Make)

> Join the [Make Fans](https://samliew.com/make-discord-invite) Discord server to [chat](https://samliew.com/make-discord-invite) with other makers!

---

<div class="post-metadata">

**Author:** ![hugo2](https://avatars.discourse-cdn.com/v4/letter/h/db5fbb/32.png) [@hugo2](https://community.make.com/u/hugo2)\
**Post date:** [July 4, 2024, 7:33am UTC](https://community.make.com/t/filter-data-from-array-associate-them/44428/10 "2024-07-04T07:33:09Z")

</div>

Okay, 1 is just for the first item in array right ? But when I pull the request, I have between 50 to 100 events directly in array

---

<div class="post-metadata">

**Author:** ![Make\_Bot](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/make_bot/32/14661_2.png) [@Make\_Bot](https://community.make.com/u/Make_Bot)\
**Post date:** [October 2, 2024, 7:37am UTC](https://community.make.com/t/filter-data-from-array-associate-them/44428/11 "2024-10-02T07:37:25Z")

</div>

This topic was automatically closed because it's resolved or inactive. Please, start a new topic.


