cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jhenry
Level: Powered On

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
Community Support Team
Community Support Team

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.
3 REPLIES 3
Highlighted
Super User
Super User

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!


jhenry
Level: Powered On

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.

Community Support Team
Community Support Team

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.

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Users Online
Currently online: 48 members 4,950 guests
Please welcome our newest community members: