Hi,
I am using Power Automate (formerly Microsoft Flow) to intermediate communication with a Cosmos DB, with good success.
However, there are some peculiarities that bother me.
Given the record created by:
Set(domain_update,
{
pkey: "domains",
id: "",
ou_id: LookUp(cosmos_ous_col,ou_id = GalleryDomains.Selected.ou_id).id,
domain: GalleryDomains.Selected.domain,
foreign_id:[{
system:"contoso",
pkey:"fubar",
key:"id",
value:GalleryDomains.Selected.id
}]
}
);
One would expect that the foreign_id property would become an array of objects like:
...
foreign_id: [
{
"system": "contoso",
...
},
{
"system": "fabrikam",
...
}
]
However, when I JSON() the variable domain_update, what I get is:
...
foreign_id: [
{
"Value":
{
"system": "contoso",
...
}
},
{
"Value":
{
"system": "fabrikam",
...
}
}
]
It seems counter-intuitive an unjustified to wrap the objects around like that, and I didn't find anything in the documentation on ways to prevent this wrapping.
What is causing, and is there a way to prevent the double-objectification?
THanks

Report
All responses (
Answers (