Skip to main content

Notifications

Power Automate - General Discussion
Answered

How to handle "NaN" values in JSON array

(0) ShareShare
ReportReport
Posted on by 136

Hello everyone.

 

I am trying to check the condition for "NaN" values in JSON array. After that I want to skip that record if contains "NaN" value.

Exp.

{
  "Customer""Test",
  "Time 1""NaN",
  "Time 2""0,33"
}
I have already tested a condition such as: (Outputs referirng to Timer 1)
NickFot_0-1698396496708.png

But none of them seem to work.

Any advice appreciated. Thank you.

Best regards,
Nick

  • EmadBeshai Profile Picture
    EmadBeshai 806 on at
    Re: How to handle "NaN" values in JSON array

    Hi @NickFot ,

     

    Please add at the left side of the condition the below expression after filling it with your inputs 

    contains(<Your Json>,'NaN')

    and at the right side of the condition please true and the operator is " Not Equal"

     

    If this post helps you with your problem, please mark your as Accepted Solution.
    If you like my response, please give it a Thumbs Up. 

  • Verified answer
    rzaneti Profile Picture
    rzaneti 3,365 on at
    Re: How to handle "NaN" values in JSON array

    Hi @NickFot ,

     

    From my end, I've tested the condition with "NaN" (without quotes) and it worked fine. Another option that also worked is to set the expression string('NaN').

     

    rzaneti_1-1698405639544.png

     

    rzaneti_0-1698405629633.png

     

    I know that it is kind of a repetitive method, as "NaN" should be already a string, but let's see if it works for you 🙂

     

    Let me know if it works for you or if you need any additional help!

     

    -------------------------------------------------------------------------
    If this is the answer for your question, please mark the post as Solved.
    If this answer helps you in any way, please give it a like.

    http://digitalmill.net/ 

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,445

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,741

Leaderboard