cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Json Parse Schema

I am trying to parse data from my API into Flow, however i cannot figure out how to parse a list of objects. I want the end result be that for each item in the list, i can send an email about it.

 

Data given by API:

 

{
  "item1" : {
    "category" : "1",
    "name" : "my name",
    "data" : "my data"
  },
  "item2" : {
    "category" : "2",
    "name" : "my name",
    "data" : "my data"
  }.........
}

 

payload given by JSON parser:

 

{
  "type": "object",
  "properties": {
    "item1": {
      "type": "object",
      "properties": {
        "category": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "data": {
          "type": "string"
        }
      }
    },
    "item2": {
      "type": "object",
      "properties": {
        "category": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "data": {
          "type": "string"
        }
      }
    }
  }
}

how to i set the parser to understand there may be diffrent items in the list?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Json Parse Schema

Hi @jhenry,

 

Take a look at the parse JSON Action:

Parse JSON messages

Then you should be able to manage the items returned by the Parse JSON Action.

 

Regards,

Michael

Community Support Team _ Michael Shao
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

3 REPLIES 3
Highlighted
Power Participant
Power Participant

Re: Json Parse Schema

Hi @jhenry

 

What you need to do after parse? i really recommend you to use the expression json() to parse your text in this case.

 

If you can explain a little more for us your case will be great.

 

Hope have helped,

 

Gustavo Moraes


Did I answer your question? Mark my post as a solution!

Gustavo Moraes, o astronauta brasileiro do Flow!


Highlighted
Regular Visitor

Re: Json Parse Schema

hi @gamoraes,

 

For each Item (item1,item2,item3.....) i want to get its name and email it someone. I will use the json() to parse the body to json, but i still need to parse the data correctly since it is not a finite amount of information.

Highlighted
Community Support
Community Support

Re: Json Parse Schema

Hi @jhenry,

 

Take a look at the parse JSON Action:

Parse JSON messages

Then you should be able to manage the items returned by the Parse JSON Action.

 

Regards,

Michael

Community Support Team _ Michael Shao
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
firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Kudoed Authors
Users online (7,095)