cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

FirstImage

Microsoft Ignite 2020

Check out the announcement of Power Platform content at Microsoft Ignite!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Users online (1,791)