(First off, I'm a beginner - so please excuse me if any of my language is incorrect)
I'm working on a flow where I'm trying to essentially scrape an email to create named values that can then be pulled into other aspects. I have a form that sends an email with the form content to an account, and I'm not able to modify the format of that email.
I've gotten far enough along that I get the field names and their values into an object:
Which looks like this:
{
"@{trim(body('Filter_array')[0])}": @{trim(body('Filter_array')[1])},
"@{trim(body('Filter_array')[2])}": @{trim(body('Filter_array')[3])},
"@{trim(body('Filter_array')[4])}": @{trim(body('Filter_array')[5])},
"@{trim(body('Filter_array')[6])}": @{trim(body('Filter_array')[7])},
"@{trim(body('Filter_array')[8])}": @{trim(body('Filter_array')[9])},
"@{trim(body('Filter_array')[10])}": @{trim(body('Filter_array')[11])},
"@{trim(body('Filter_array')[12])}": @{trim(body('Filter_array')[13])},
}
Then I can do Parse JSON from there which is fantastic - but my issue is that if someone leaves a field blank when filling in the form, that is completely left out of the email, so the "Filter_array" array would now only go up to 11, and "body('Filter_array')[12])" and "body('Filter_array')[13])" would no longer exist. Is there a way to have the mapping only go through as many array values as actually exist?


Report
All responses (
Answers (