When using custom connectors I have run into two issues with JSON arrays.
1) Arrays that do not contain data is not presented in PowerApps at all.
Input JSON
{
"input_array":[]
}
Expected output
input_array (as an empty table)
Actual result
input_array table is not created in PowerApps. The input_array property does not exist in PowerApps at all.
2) PowerApps converts simple arrays to single column tables with the column name "Value", and keeps this conversion when you attempt to use this data in a custom connector as output from the PowerApp.
Input JSON to PowerApps:
{
"input_array":[
1,
2,
3
]
}
PowerApps representation of input JSON:
input_array
| Value |
| 1 |
| 2 |
| 3 |
Desired output to custom connector:
{
"output_array":[
1,
2,
3
]
}
Actual result:
{
"output_array":[
{
"Value":1
},
{
"Value":2
},
{
"Value":3
}
]
}
These convertions are causing me some issues because a use case requires that I can check if input_array exists as a property or if it contains any data.
Since usin an empty json array as input means the table is not created at all, I do not know how I could perform such checks.
Also I am having trouble finding an easy way to transform single column tables into simple arrays for output to a custom connector. Especially if the target table is nested within other tables or records.
Has anyone else found good solutions to working around these types of issues? Are there maybe some simple solutions I have missed?

Report
All responses (
Answers (