# Filtering JSON after a Router and Iterator

**URL:** <https://community.make.com/t/filtering-json-after-a-router-and-iterator/54930>\
**Category:** Questions\
**Tags:** iterator, arrays, filters, json\
**Created:** [September 13, 2024, 10:43am UTC](https://community.make.com/t/filtering-json-after-a-router-and-iterator/54930 "2024-09-13T10:43:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![andremoura](https://avatars.discourse-cdn.com/v4/letter/a/73ab20/32.png) [@andremoura](https://community.make.com/u/andremoura)\
**Post date:** [September 13, 2024, 10:43am UTC](https://community.make.com/t/filtering-json-after-a-router-and-iterator/54930/1 "2024-09-13T10:43:07Z")

</div>

Hi

I have the following scenario (the 1st route is not necessary for now):

 ![Screenshot 2024-09-13 at 10.54.51](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/0/3/03befc8fc2df2e1948c6327a5d0e89a2ae12002c.jpeg)

The first step is to read a JSON. With this flow, I create a list of IDs for each one of the Google Sheet steps.

However, I need to list IDs only if I can find two sets of terms in a specific field in all JSON items.

From the flow above, I can only find this specific field when creating filters between the second router and the aggregator and between the Array Aggregator and Google Sheets.

When I create the following filter between Router and Array Aggregator:

 ![Screenshot 2024-09-13 at 11.00.22](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/d/8/d8ce00ac902b61a8cc4490b3fce977073dc52d7b.png)

I have the error message when processing the Google Sheets step: _**Function ‘prepareBodyForInsert’ finished with error! Cannot read properties of undefined (reading ‘match’)**_ (and Output bundle 0kb)

When I have the same filter between Aggregator and Google Sheets, I get zero results (no Output Bundle, once Google Sheet doesn’t process).

**Important** : flow with no filter works fine!

Blueprint:  
[blueprint.json](https://community.make.com/uploads/short-url/oK9D3CYFuHhX3NpeRpJjzsjgC5x.json) (40.5 KB)

Output Bundle files to support:  
[Iterator Bundle.txt](https://community.make.com/uploads/short-url/56yPCJBV5J3ElcsDrnkmPEaBdZz.txt) (1.5 MB)  
[array-agreggator.txt](https://community.make.com/uploads/short-url/3SJSWcejFtFnw8wDxMLZVzx874f.txt) (66 Bytes)  
[array aggregator pre-filter.txt](https://community.make.com/uploads/short-url/4PZFnapPNepVxEiZmrqz3CYh3eu.txt) (250.1 KB)  
[Acesso Ficha.txt](https://community.make.com/uploads/short-url/srMH94bOoa6rOi0BxqtLzPusC4J.txt) (1.8 MB)

Any help?

---

<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:** [December 12, 2024, 11:55am UTC](https://community.make.com/t/filtering-json-after-a-router-and-iterator/54930/2 "2024-12-12T11:55:26Z")

</div>


