I have a azure logic app that receives an input json string. I would like to pass this over to a JSON to Table action. However, I am having difficulties as the JSON to Table needs an input of type object. After researching I thought I need to parse the string first and then give the body of the parse json action as the input to the JSON to Table action.
I am not sure what the correct expression for the entire JSON object after the Parse JSON action is. I have tried with @{body('Parse_JSON')} (what chatgbt suggestsed) but it gives 'invalid expression'. Would anyone know the correct expression?
On another note, I've noticed that when I manually insert the entire string in the Data field of JSON to Table it works fine. When I intiated a variable of type object with the string as the value it worked as well. However, I have not found a way to integrate to Content of my trigger. When I pass the Content directy to the JSON to Table I get the error: Unable to cast object of type 'Newtonsoft.Json.Linq.JValue' to type 'Newtonsoft.Json.Linq.JContainer'.
My input string looks something like this:
{
"comment": null,
"data": {
"id": "123",
"Person": {
"Name": "Testmann",
"Firstname": "Tim"
},
"Timestamp": "2023-03-22T20:16:04.663252+01:00",
"Fotos_Apppletree": [
{
"photo_description_1": null,
"_1_Foto_Appletree": {
"fileId": "10",
"fileName": "Appletree_2023_03_22_19_16_09.png",
"timestamp": "2023-03-22T19:16:09.082243Z",
"size": 63865,
"url": "https://path10"
}
},
{
"photo_description_2": null,
"_1_Foto_Appletree": {
"fileId": "11",
"fileName": "Appletree_2023_03_22_19_16_15.png",
"timestamp": "2023-03-22T19:16:15.082243Z",
"size": 63865,
"url": "https://path11"
}
}
]
}
}
Does anyone know how to tackle this string/object problem. Thanks a lot for any help!