Hello,
I have an array that contains the keys/columns that I want in my final output that looks like this:
[
"a",
"b",
"c",
"d"
]
Note that this array is dynamic, and can be different each run of the flow. So It can present only 3, 4 or more keys.
Then I have the following
[
{
"a": "Jonh",
"b": "2023-06-01",
"c": No,
"d": "63055571",
"e": "12",
"f": "null",
"g": "red",
"h": "Paris",
"i": "true",
"j": "55.9"
},
{
"a": "Ana",
"b": "2024-06-01",
"c": Yes,
"d": "63073455",
"e": "12",
"f": "null",
"g": "green",
"h": "London",
"i": "false",
"j": "34.5"
},
...
]
Now I need a way to be able to dynamically filter the keys/columns so I have in the second only the columns from the first array like this:
[
{
"a": "Jonh",
"b": "2023-06-01",
"c": No,
"d": "63055571"
},
{
"a": "Ana",
"b": "2024-06-01",
"c": Yes,
"d": "63073455"
},
...
]
And in the end save it to CSV.
The issue here is that i am not finding a way to dynamically filter it to only output the columns on the first array.