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 / How i can check if a p...
Power Automate
Answered

How i can check if a property does not exists inside Parsed JSON file

(0) ShareShare
ReportReport
Posted on by 2,051 Season of Giving Solutions 2025

I am parsing a JSON list with this schema:-

 

{
 "type": "array",
 "items": {
 "type": "object",
 "properties": {
 "Brand": {
 "type": [
 "string",
 "null"
 ]
 },
 "OOH_price_list": {
 "type": "object",
 "properties": {
 "Net_Total": {
 "type": [
 "string",
 "null"
 ]
 },
 "SalesTax": {},
 "Grand_Total": {
 "type": [
 "string",
 "null"
 ]
 },
 "Total": {
 "type": [
 "string",
 "null"
 ]
 },
 "DIscount": {
 "type": [
 "string",
 "null"
 ]
 }
 }
 },
 "BR_price_list": {
 "type": "object",
 "properties": {
 "Net_Total": {
 "type": [
 "string",
 "null"
 ]
 },
 "Grand_Total": {
 "type": [
 "string",
 "null"
 ]
 },
 "Amount_In_Words": {
 "type": [
 "string",
 "null"
 ]
 },
 "Sales_Tax": {
 "type": [
 "string",
 "null"
 ]
 }
 }
 },
 "OOH_media_list": {
 "type": "array",
 "items": {
 "type": "object",
 "properties": {
 "Network": {
 "type": [
 "string",
 "null"
 ]
 },
 "Amount": {
 "type": [
 "string",
 "null"
 ]
 },
 "Duration": {
 "type": [
 "string",
 "null"
 ]
 },
 "of_Faces": {
 "type": [
 "string",
 "null"
 ]
 },
 "Start_Date": {
 "type": [
 "string",
 "null"
 ]
 },
 "End_Date": {
 "type": [
 "string",
 "null"
 ]
 },
 "Delivery Date": {
 "type": [
 "string",
 "null"
 ]
 }
 },
 "required": [
 "Network",
 "Amount",
 "Duration",
 "of_Faces",
 "Start_Date",
 "End_Date",
 "Delivery Date"
 ]
 }
 },
 "blue_river_list": {
 "type": "array",
 "items": {
 "type": "object",
 "properties": {
 "Network": {
 "type": [
 "string",
 "null"
 ]
 },
 "Amount": {
 "type": [
 "string",
 "null"
 ]
 },
 "Cost_Face": {
 "type": [
 "string",
 "null"
 ]
 },
 "of_Faces": {
 "type": [
 "string",
 "null"
 ]
 },
 "Start_Date": {
 "type": [
 "string",
 "null"
 ]
 }
 },
 "required": [
 "Network",
 "Amount",
 "Cost_Face",
 "of_Faces",
 "Start_Date"
 ]
 }
 },
 "Contract_Number": {
 "type": [
 "string",
 "null"
 ]
 },
 "Client Name": {
 "type": [
 "string",
 "null"
 ]
 },
 "Sector": {
 "type": [
 "string",
 "null"
 ]
 },
 "No of Faces": {
 "type": [
 "string",
 "null"
 ]
 },
 "Sales Person Name": {
 "type": [
 "string",
 "null"
 ]
 },
 "Sales Person Email": {
 "type": [
 "string",
 "null"
 ]
 }
 },
 "required": [

 ]
 }
}

 

now i want to get the following property named "Grand_Total":-

 

if(empty(items('Apply_to_each')['OOH_price_list']),null,items('Apply_to_each')['OOH_price_list']['Grand_Total'])

 

but on some items i am getting this error:-

 

'if(empty(items('Apply_to_each')['OOH_price_list']),null,items('Apply_to_each')['OOH_price_list']['Grand_Total'])' cannot be evaluated because property 'OOH_price_list' doesn't exist, available properties are 'Brand, BR_price_list, OOH_media_list, Category, Sales Person Email, blue_river_list, Contract_Number, Client Name, Sector, No of Faces, Blue River, Sales Person Name'.

 

so how i can check if the OOH_price_list is there to get its properties? seems empty function will not work

Categories:
I have the same question (0)
  • Verified answer
    DJ_Jamba Profile Picture
    2,837 Moderator on at

    Hi @johnjohnPter 

    If you try to access the path like this:

    items('Apply_to_each')['OOH_price_list']['Grand_Total']


    It means, evaluate ['OOH_price_list'] because it is definitely there and evaluate ['Grand_Total'] because it is definitely there, so you will get an error if it's not there.

     

    If you access the path like this:

    items('Apply_to_each')?['OOH_price_list']?['Grand_Total']

     

    The question mark ? means evaluate if it's there.

     

    Try:

    if(
     equals(
     items('Apply_to_each')?['OOH_price_list']?['Grand_Total'],
     null
     ),
     null,
     items('Apply_to_each')?['OOH_price_list']?['Grand_Total']
    )
  • DJ_Jamba Profile Picture
    2,837 Moderator on at

    @johnjohnPter  - Did it work??

    If so - can you mark as solution 😁

  • johnjohnPter Profile Picture
    2,051 Season of Giving Solutions 2025 on at

    @DJ_Jamba ok it worked

  • DJ_Jamba Profile Picture
    2,837 Moderator on at

    Good stuff - glad it worked!

    d(-_-)b

  • jrussi1301 Profile Picture
    38 on at
    try:
     
    coalesce(items('Apply_to_each')?['OOH_price_list']?['Grand_Total'],null)

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 273 Super User 2026 Season 2

#2
trice602 Profile Picture

trice602 149 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 144 Super User 2026 Season 2

Last 30 days Overall leaderboard