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 / Problem with Parse JSO...
Power Automate
Answered

Problem with Parse JSON - is of type 'Null'. The result must be a valid array.

(0) ShareShare
ReportReport
Posted on by 3

Hi, I'm extracting data from a sharepoint list via a HTTP Rest API call and then parsing the output which ends up with a relatively simple looking JSON extract. But when I try and loop through it, I get the following error....

 

The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@body('Parse_JSON')?['body']?['value']' is of type 'Null'. The result must be a valid array.

 

The output from my PARSE JSON is in this format (trunctuated and anonymised for simplicity). I've tried googling, and am sure there is a simple thing I'm doing wrong, but not sure what

 

 

{
 "body": {
 "odata.nextLink": "https://myurlwiththeAPIcall.com",
 "value": [
 {
 "myID": 1234,
 "Match_x0020_Level": "Exact",
 "GroupID": "bae26ea6"
 },
 {
 "myID": 2345,
 "Match_x0020_Level": "Exact",
 "GroupID": "aaf12f0e"
 }
 ]
 }
}

 

 

Categories:
I have the same question (0)
  • Verified answer
    vivekpande18 Profile Picture
    894 Super User 2024 Season 1 on at

    Hi @wowen ,

     

    You are almost right. Just do a small tweak in your expression like below. Remove the body from the expression.

     

    @body('Parse_JSON')?['value']'

     

    It should work now.

     

    Thanks,

    Vivek Pande

     

    If this post helps answer your question, please click on "Accept as Solution" to help other members find it more quickly.

    If you thought this post was helpful, please give it a Thumbs Up

  • Ellis Karim Profile Picture
    12,109 Super User 2026 Season 1 on at

    Hi @wowen ,

     

    Use the sample data to generate the JSON schema:

    Snag_373c7bd.png

     

    Snag_377f504.png


    Ellis
    ____________________________________
    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

     

  • artivo36 Profile Picture
    78 on at

    still wrong:

    @{body('Parse_JSON')?['value']}

    is correct

     

    However, nice solution.

    Thank you

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 411

#2
David_MA Profile Picture

David_MA 300 Super User 2026 Season 1

#3
Vish WR Profile Picture

Vish WR 291

Last 30 days Overall leaderboard