cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dstanisljevic
New Member

Parsing Data from JSON

Hello,

 

When using REST API for Oracle Service Cloud, my request is returning the following payload:

 

{
"items": [
{
"tableName": "incidents",
"count": 4,
"columnNames": [
"id",
"createdTime",
"updatedTime",
"subject"
],
"rows": [
[
"2638179",
"2020-10-30T15:51:00Z",
"2020-11-02T14:46:03Z",
"Issue 1"
],
[
"2639031",
"2020-11-02T14:19:38Z",
"2020-11-02T14:23:51Z",
"Issue 2"
],
[
"2639100",
"2020-11-02T15:07:46Z",
"2020-11-02T15:41:19Z",
"Issue 3"
],
[
"2639122",
"2020-11-02T15:23:01Z",
"2020-11-02T15:23:03Z",
"Issue 4"
]
]
}
]
}

I've gotten as far as getting the JSON into Power Automate via the Parse JSON but my struggle is converting the data into a table. I'm looking to only parse out everything under "rows". The table should be four columns (id,createdtime,updatedtime,subject) with just that data under the "rows" area. Any advice would be truly appreciated. Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
v-litu-msft
Community Support
Community Support

Hi @dstanisljevic,

 

After parse JSON action, initialize an array variable to hold the formated rows array. Then use Create HTML table to create a table.

This code you could paste it directly in the Append to array variable action: 

{
   "id": "@item()[0]",
   "createdtime": "@item()[1]",
   "updatedtime": "@item()[2]",
   "subject": "@item()[3]"
}

Screenshot 2020-11-03 150208.jpg

 

Screenshot 2020-11-03 150304.jpg

 

Screenshot 2020-11-03 150320.jpg

Run result:

Screenshot 2020-11-03 150143.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-litu-msft
Community Support
Community Support

Hi @dstanisljevic,

 

After parse JSON action, initialize an array variable to hold the formated rows array. Then use Create HTML table to create a table.

This code you could paste it directly in the Append to array variable action: 

{
   "id": "@item()[0]",
   "createdtime": "@item()[1]",
   "updatedtime": "@item()[2]",
   "subject": "@item()[3]"
}

Screenshot 2020-11-03 150208.jpg

 

Screenshot 2020-11-03 150304.jpg

 

Screenshot 2020-11-03 150320.jpg

Run result:

Screenshot 2020-11-03 150143.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Users online (20,719)