web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Saving parseJSON as array
Power Automate
Answered

Saving parseJSON as array

(0) ShareShare
ReportReport
Posted on by 18

So, I have a flow where I made a query that gives the value from a list rows action I am trying to parse the JSON so it gives the station names in a an array that I can then use and loop through the array to list out the station names in an email. 

Here is my list rows
Bacon1_0-1707920434149.png

 


Then here is my parseJSON that follows

Bacon1_1-1707920434047.png

 

Then the step that follows the parseJSON

Bacon1_2-1707920434084.png

 

 

I guess where I am confused, and still trying to figure out is what the value of the variable in the apply to each is going to be? When the schema was set up as an object instead of an array I had access to pod_names but because the schema is an array I only have body that it lets me use from the parse JSON step. Any help would be appreciated. 

 
 
Categories:
I have the same question (0)
  • SamLed Profile Picture
    2,338 Moderator on at

    Hi @Bacon1,

     

    List rows outputs is already parsed, no need to use Parse JSON:

    SamLed_1-1707929084317.png

    _____________________________________________________________

    If I have answered your question, please Accept the post as solution.
    If you like my response, please Thumbs Up.

  • Bacon1 Profile Picture
    18 on at

    @SamLed still trying to figure this out. I ended up getting rid of the parse, and I see the list rows outputs an array of objects. I want to just have the station names in a array variable that I can eventually over. SO here is the new part of the flow right now. can see the attached photo, but it gives me an error
    "the input is of type Array which cannot be appended to the variable Station Names of type Array"
    says the append action only supports values of objects, floats, integers, string, boolean, object

     

    mmmmmmm.png
  • Verified answer
    SamLed Profile Picture
    2,338 Moderator on at

    Hi @Bacon1,

     

    What you are trying to achieve with your current apply to each design, is to append all the objects returned by "List rows" in a variable and such for each objects. So if you have 5 objects returned, you'll have 5 times all objects in your variable.

     

    To get only Station names, append items('Apply_to_each')?['Name'] to your variable. Have a look in the "List rows" raw outputs if 'Name' is the right property title for the data you are looking for.

     

    items('Apply_to_each') means current item the apply to each it iterating

    means "if property exist" in JSON selection

    ['property name'] is the name of the object property in the JSON outputs

     

    Finally to explain you the error you encounter, you can't append an array to an array variable, have a look to this, I've already answered about that subject in another topis: Solved: Re: Error appending array to an array variable - Power Platform Community (microsoft.com)

    ______________________________________________________________

    If I have answered your question, please Accept the post as solution.
    If you like my response, please Thumbs Up.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 60 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 54

#3
Expiscornovus Profile Picture

Expiscornovus 47 Most Valuable Professional

Last 30 days Overall leaderboard