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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / if statement with dyna...
Power Automate
Unanswered

if statement with dynamic content from JSON

(0) ShareShare
ReportReport
Posted on by 7

Hello,

 

I'm trying to figure out the proper format to create an if statement expression from the output of a parsed JSON.

 

My expression would look like this:
body('Parse_JSON')['Value']

 

if Value equals "Whatever", I want the output to be True, if not I want the output to be False.

Categories:
I have the same question (0)
  • jomo797 Profile Picture
    7 on at

    Of course as soon as I post this I answer my own question.

     

    if(equals(body('Parse_JSON')['Value'], 'Whatever'), true, false)

  • jomo797 Profile Picture
    7 on at

    I spoke too soon. This works unless the expression is null so I need a way to account for that.

  • Verified answer
    grantjenkins Profile Picture
    11,063 Moderator on at

    If it might be null, then you could just add a ? to allow for nulls in your expression.

    //What you currently have
    if(equals(body('Parse_JSON')['Value'], 'Whatever'), true, false)
    
    //To allow for Value being null (added ?)
    if(equals(body('Parse_JSON')?['Value'], 'Whatever'), true, false)

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard