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
Memorable Member
Memorable Member

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Users online (7,501)