Hi all!
I get data from a Google Sheet containing name-company data. It looks like this:
"array": [
{
"0": "John Doe",
"1": "John's Company"
},
{
"0": "Frank Miller",
"1": "Miller's Bikes"
},
{
"0": "Tom Holland",
"1": "Spiderman Fanshop"
},
...
I have a second array, containing another set of name-company pairs, which looks the same as the other array:
"array": [
{
"0": "Jane Doe",
"1": "Jane's Company"
},
{
"0": "Phillip Butler",
"1": "Butler Shop"
},
{
"0": "Frank Miller",
"1": "Miller's Bikes"
},
...
I’m iterating over the first customers array, and only want to continue with the bundles that are in BOTH arrays.
So far I’m using this filter:
{{length(map(11.array; 1; 1; 12.company.name))}} > 0
The problem:
It can happen that multiple companys share the same name, which leads to messed up results.
To avoid this, I need to filter for BOTH keys, company name and owner name.
How would I do this?
In short:
I have two arrays. I’m iterating over one and need to check if the current entry is also stored in the other array. I need to check for multiple conditions.