I have a Select step which is successfully parsing out JSON values out of a larger response. Here's the setup for it in the Code View:
{
"type": "Select",
"inputs": {
"from": "@body('Parse_JSON_from_Collection')",
"select": {
"PBIReport1": "@item()['PBIReport1']",
"PBIReport2": "@item()['PBIReport2']",
"PBIReport3": "@item()['PBIReport3']",
"PBIReport4": "@item()['PBIReport4']",
"PBIReport5": "@item()['PBIReport5']"
}
},
"runAfter": {
"Get_Emails": [
"Succeeded"
]
}
}
The output from this step with data that was parsed out earlier is below:
[
{
"PBIReport1": "https://app.powerbi.com/groups/workspace_id_1/reports/report_id_1",
"PBIReport2": "https://app.powerbi.com/groups/workspace_id_2/reports/report_id_2",
"PBIReport3": "",
"PBIReport4": "",
"PBIReport5": ""
}
]
I'd like to filter the array only to where the value is not null/blank/empty so that I can dynamically create a HTML table because there could be anywhere from 1 to 5 items that were submitted in the response. The output I would be looking for would be something like this:
[
{
"PBIReport1": "https://app.powerbi.com/groups/workspace_id_1/reports/report_id_1",
"PBIReport2": "https://app.powerbi.com/groups/workspace_id_2/reports/report_id_2"
}
]
Is this something that is possible within Power Automate? I have reviewed a lot of posts about removing null rows with Filter Array, but I can't seem to find anything about evaluating KVP sets.
Thanks!