Hi all, fairly new to Power Apps. I am building an app where users select some items in a gallery which displays Sharepoint search results, to then export them to csv through a power automate flow.
When using the JSON() function in Power Apps to connect with the export flow, I get the "JSON function cannot serialize tables / objects with a nested property called 'Value' of type 'UntypedObject'." error.
The suggested fix in most posts online is using JSONFormat.IgnoreUnsupportedTypes, but results in an empty JSON being sent to Power Automate.
Structure of data returned by Sharepoint search API is:
[
{
"IndividualSearchResult": [
{
"Key": "SomeKeyName", //for example "Title"
"Value": "KeyValue", //actual title of the search result item
"ValueType": "Edm.Int64"
},
{
"Key": "SomeKeyName",
"Value": "KeyValue",
"ValueType": "Edm.Double"
},
etc.
Is there a way to manually build the JSON to be sent to the flow, or another way to make the JSON function work?
I was thinking to loop through the keys and build a valid JSON inside a variable but there don't seem to be any comprehension options or methods to create it.
All help is appreciated, thanks!