cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
phil4mat
Frequent Visitor

parsing generic json key value pairs

I have  some data pushed to Flow as an HTTP request received in the format below:

I've tried various json parse, compose, select and conditional workflow options.

However I can't find an efficient way to get each subitems keys and values into a variable structure so that I can send this to a stored procedure. This is just multiple fields for one record update. Can anyone help? 

 

{
"$content-type": "application/x-www-form-urlencoded",
"$content": "sdsdfsdfsdfsdf",
"$formdata": [
{
"key": "type",
"value": "update"
},
{
"key": "date_time",
"value": "2018-12-03T15:00:47-06:00"
},
{
"key": "initiated_from",
"value": "admin"
},
{
"key": "initiated_by",
"value": "admin"
},
{
"key": "list",
"value": "0"
},
{
"key": "contact[id]",
"value": "3870"
},
{
"key": "contact[email]",
"value": "x@x.com"
},
{
"key": "contact[first_name]",
"value": "xxx"
},
{
"key": "contact[last_name]",
"value": "xxx"
},
{
"key": "contact[phone]",
"value": ""
},
{
"key": "contact[ip]",
"value": "127.0.0.1"
},
{
"key": "contact[tags]",
"value": "test1,test2,test3"
},
{
"key": "contact[fields][14]",
"value": "2018-11-30"
},
{
"key": "contact[fields][17]",
"value": "85"
},
{
"key": "contact[fields][18]",
"value": "1481526"
},
{
"key": "contact[fields][7]",
"value": "sdfaswasf"
},
{
"key": "contact[orgname]",
"value": "asdgawfa"
},
{
"key": "orgname",
"value": "asfasdf"
}
]
}

 

For the time being I'm using a Parse JSON, Filter Variables then Apply To Each Set Variables, but feels rather clunky.

 

flow.PNG

1 REPLY 1
paleicester
Frequent Visitor

I wonder if this ever got solved. I have a generic flow which receives a variety of JSON format name value pairs and I am able to direct this data to the  appropriate sharepoint list. A generic JSON parser would save so much effort and keep my flow scalable. Any thoughts

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (1,236)