Hi Guys,
I am still utilizing iterator route whenever there is comma in values that can be used in functions like map, but those functions doesn’t work when filtering value contains comma.
Any solution so far to escape the comma directly in function mapping? or is it still not popssible.
Appreciate the help!
Best,
@Prem_Patel
Hey Prem,
can you post some examples? For most cases you can use either \ or / to escape a character.
1 Like
Thanks for taking interest!
-
JSON :
-
Map formula : where i tried both escaping character possibilities already but it doesn’t work.
-
output :
And it works if there is no comma :
I have JSON as test data in JSON parse module from output of calendly events booking webhook, which has an array of items with question and answers, it has position that i can use in map function but it doesn’t stays the same if there are more question and answer, so can’t use position to get answer. so i need to get answer based on question using map.
Happy to explore other function if useful.
Wait so if the question is with a comma it doesn’t work and if you remove the comma it works? Can you share the output JSON of the module so I can replicate it?
1 Like
Yes, that’s the case i guess. Here you go. json for the array :
{
“questions_and_answers”: [
{
“answer”: “Yes”,
“position”: 0,
“question”: “Does this Customer have an HOA?”
},
{
“answer”: “200”,
“position”: 1,
“question”: “What’s the Sold Price Per Watt (PPW)? (If FREE enter $0)”
}
]
}
OK I see what is causing the issue. In that spot of the map() function you can use comma to separate different values to map against. So you can’t have a comma in the value it self.
As a work around - you can have an iterator module go through the array and then have a filter check if the question matches that name. Then you can pull the value you want.
Yes, I use iterator in such case or just remove comma in the question or whatever key we use. So that works as always.
Not sure if such thing needs to be escaped or not, so we can just avoid commas.
Exploring such limitations knowing that it can’t be solved, hurts!!!