So I’m trying to use the map function to get a list of the employee names. But the map function keeps giving me empty lists. I have tried nested maps, but they too would either return empty lists or return nested lists, not a list of names. Please help.
Here are the pictures of the variables arrays and the outputs.
Hey @Karan_Chaudhary , can you share the JSON string you’re trying to perform the map function on.
Let’s figure this out together.
1 Like
Hey Karan,
most likely Employee Name is misspelled in the formula. Also Win+Shift+S opens the snipping tool, you can take screenshots with it and post them directly.
Hello,
I believe I’ve recreated your JSON schema correctly.
JSON
{ "Array": [ { "properties_value": { "Hours Worked": { "number": 8 }, "Shift Date": { "start": "2025-11-10" }, "Employee Name": [ { "type": "text", "text": "Dillon Jefferson", "annotations": {}, "plain_text": "Dillon Jefferson" }, { "type": "text", "text": "Maria Lopez", "annotations": {}, "plain_text": "Maria Lopez" }, { "type": "text", "text": "Liam Nguyen", "annotations": {}, "plain_text": "Liam Nguyen" } ] } }, { "properties_value": { "Hours Worked": { "number": 7 }, "Shift Date": { "start": "2025-11-11" }, "Employee Name": [ { "type": "text", "text": "Ava Patel", "annotations": {}, "plain_text": "Ava Patel" } ] } }, { "properties_value": { "Hours Worked": { "number": 9 }, "Shift Date": { "start": "2025-11-12" }, "Employee Name": [ { "type": "text", "text": "Noah Smith", "annotations": {}, "plain_text": "Noah Smith" } ] } } ] }
The correct function should look like this:
{{map(flatten(map(map(1.Array; "properties_value"); "Employee Name")); "plain_text")}}
You can also review a working example here:
1 Like