I struggled with this a little bit myself, and I know it's one of those questions that people come up against often. The desire to take Collection data and pass it to Flow as a fully formed JSON array that can be easily worked with in Flow. I came up with the below solution which works really well for me, so I thought I'd provide it in case anyone else needs it 🙂
I have a Gallery collection which has checkboxes. I want to add each checked item to a JSON array prior to passing it to FLOW. Below is my formula for this:
"{" & Mid(Concat(groupStores, ",""" & store_id & """"),2,5000) & "}"Which produces the following:
{
"228",
"721",
"328",
"658",
"655",
"415",
"427"
}Adding or removing from the string correctly re-builds the string with the right quotes and commas etc. Hopefully this helps someone else who needs to do this 🙂