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

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Compare Value from Parse JSON

(0) ShareShare
ReportReport
Posted on by 4

I'm trying to take the value of the "status" field that is created from a Parse JSON action applied to the return of an HTTP call but for some reason when I pass the "status" field to the Condition action to see if it equals "Complete", it returns False even when the value is "Complete".

 

ParseJSON.PNG

 

 

The worse part is that I had it working and accidentally deleted the correct conversion of the "status" field to be able to compare it to text even though it is technically a string anyways. Really wish I could view some sort of changelog for my flows.

 

Does anyone know how to make this work?

I have the same question (0)
  • ChristianAbata Profile Picture
    8,949 Most Valuable Professional on at
    Re: Compare Value from Parse JSON

    Hi friend I recomment you use trim

    trim.PNG

    Sometimes is a white space the problem, or you can see in the test flow if the value is exactly the same for example if the response of status is "complete" and you are comparing with "Complete", the the response will be false. you need to compate "complete" with "complete".

    Another solution is convert the answer in string to ensure that you are compering two Strings.

    string.PNG

  • wclein Profile Picture
    4 on at
    Re: Compare Value from Parse JSON

    I just tried both TRIM and STRING as well as TRIM(STRING()) and neither worked. I also tried Contains instead of Is Equal To. Here is the output from the Parse JSON action:

     

    ParseJSON2.PNG

     

    I can't for the life of me figure out what it doesn't like here.

  • ChristianAbata Profile Picture
    8,949 Most Valuable Professional on at
    Re: Compare Value from Parse JSON

    Please Try to extract the status value in a separeted compose the use the compose output to compare in the condition.

  • wclein Profile Picture
    4 on at
    Re: Compare Value from Parse JSON

    That didn't fix it, but it did at least point to a different area as the issue. I tried to Compose using trim(string(body('Parse_Response_Info')?['data']?['status'])) and it returned a blank value:

     

    ParseJSON3.PNG

     

    I'm not sure if it's a schema issue or what. Below is the scheme and response from the Parse JSON:

     

     

    {
     "type": "object",
     "properties": {
     "$schema": {
     "type": "string"
     },
     "$ref": {
     "type": "string"
     },
     "definitions": {
     "type": "object",
     "properties": {
     "Welcome": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     },
     "additionalProperties": {
     "type": "boolean"
     },
     "properties": {
     "type": "object",
     "properties": {
     "result_ok": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     }
     }
     },
     "data": {
     "type": "object",
     "properties": {
     "$ref": {
     "type": "string"
     }
     }
     }
     }
     },
     "required": {
     "type": "array"
     },
     "title": {
     "type": "string"
     }
     }
     },
     "Data": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     },
     "additionalProperties": {
     "type": "boolean"
     },
     "properties": {
     "type": "object",
     "properties": {
     "id": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     },
     "format": {
     "type": "string"
     }
     }
     },
     "contact_id": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     }
     }
     },
     "status": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     }
     }
     },
     "is_test_data": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     },
     "format": {
     "type": "string"
     }
     }
     },
     "date_submitted": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     }
     }
     },
     "session_id": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     }
     }
     },
     "language": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     }
     }
     },
     "date_started": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     }
     }
     },
     "link_id": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     },
     "format": {
     "type": "string"
     }
     }
     },
     "url_variables": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     },
     "items": {
     "type": "object"
     }
     }
     },
     "ip_address": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     }
     }
     },
     "referer": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     },
     "format": {
     "type": "string"
     },
     "qt-uri-protocols": {
     "type": "array",
     "items": {
     "type": "string"
     }
     }
     }
     },
     "user_agent": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     }
     }
     },
     "response_time": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     }
     }
     },
     "data_quality": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     },
     "items": {
     "type": "object"
     }
     }
     },
     "longitude": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     }
     }
     },
     "latitude": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     }
     }
     },
     "country": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     }
     }
     },
     "city": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     }
     }
     },
     "region": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     }
     }
     },
     "postal": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     },
     "format": {
     "type": "string"
     }
     }
     },
     "dma": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     },
     "format": {
     "type": "string"
     }
     }
     },
     "survey_data": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     },
     "additionalProperties": {
     "type": "object",
     "properties": {
     "$ref": {
     "type": "string"
     }
     }
     }
     }
     }
     }
     },
     "required": {
     "type": "array"
     },
     "title": {
     "type": "string"
     }
     }
     },
     "SurveyDatum": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     },
     "additionalProperties": {
     "type": "boolean"
     },
     "properties": {
     "type": "object",
     "properties": {
     "id": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     }
     }
     },
     "type": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     }
     }
     },
     "question": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     }
     }
     },
     "subquestions": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     },
     "additionalProperties": {
     "type": "object",
     "properties": {
     "$ref": {
     "type": "string"
     }
     }
     }
     }
     },
     "section_id": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     }
     }
     },
     "shown": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     }
     }
     },
     "options": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     },
     "additionalProperties": {
     "type": "object",
     "properties": {
     "$ref": {
     "type": "string"
     }
     }
     }
     }
     }
     }
     },
     "required": {
     "type": "array"
     },
     "title": {
     "type": "string"
     }
     }
     },
     "Option": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     },
     "additionalProperties": {
     "type": "boolean"
     },
     "properties": {
     "type": "object",
     "properties": {
     "id": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     }
     }
     },
     "option": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     }
     }
     },
     "answer": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     }
     }
     }
     }
     },
     "required": {
     "type": "array"
     },
     "title": {
     "type": "string"
     }
     }
     },
     "Subquestion": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     },
     "additionalProperties": {
     "type": "boolean"
     },
     "properties": {
     "type": "object",
     "properties": {
     "id": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     }
     }
     },
     "question": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     }
     }
     },
     "type": {
     "type": "object",
     "properties": {
     "$ref": {
     "type": "string"
     }
     }
     },
     "parent": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     }
     }
     },
     "answer": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     }
     }
     }
     }
     },
     "required": {
     "type": "array"
     },
     "title": {
     "type": "string"
     }
     }
     },
     "Type": {
     "type": "object",
     "properties": {
     "type": {
     "type": "string"
     },
     "enum": {
     "type": "array",
     "items": {
     "type": "string"
     }
     },
     "title": {
     "type": "string"
     }
     }
     }
     }
     }
     }
    }

     

     

    And the response:

     

    {
     "result_ok": true,
     "data": {
     "id": "1",
     "contact_id": "",
     "status": "Complete",
     "is_test_data": "1",
     "date_submitted": "2019-04-15 20:38:00 EDT",
     "session_id": "1555375046_5cb523c6c1d616.86391256_test",
     "language": "English",
     "date_started": "2019-04-15 20:37:26 EDT",
     "link_id": "8266508",
     "url_variables": {
     "controller": {
     "key": "controller",
     "value": "builder",
     "type": "url"
     },
     "action": {
     "key": "action",
     "value": "test-link-proxy",
     "type": "url"
     },
     "id": {
     "key": "id",
     "value": "4957450",
     "type": "url"
     },
     "module": {
     "key": "module",
     "value": "default",
     "type": "url"
     },
     "__sgtarget": {
     "key": "__sgtarget",
     "value": "4",
     "type": "url"
     },
     "slanguage": {
     "key": "slanguage",
     "value": "English",
     "type": "url"
     },
     "__sg_build_test": {
     "key": "__sg_build_test",
     "value": "1",
     "type": "url"
     },
     "__sg_collab_test": {
     "key": "__sg_collab_test",
     "value": "1",
     "type": "url"
     },
     "__sg_tester": {
     "key": "__sg_tester",
     "value": "ZGhlcmJAYmdjYS5vcmc=",
     "type": "url"
     },
     "__sg_tester_name": {
     "key": "__sg_tester_name",
     "value": "ZGhlcmI=",
     "type": "url"
     },
     "__sg_tester_id": {
     "key": "__sg_tester_id",
     "value": "789274",
     "type": "url"
     },
     "link_id": {
     "key": "link_id",
     "value": "0",
     "type": "url"
     },
     "preview_frame": {
     "key": "preview_frame",
     "value": "true",
     "type": "url"
     },
     "__sgapptest": {
     "key": "__sgapptest",
     "value": "true",
     "type": "url"
     },
     "__ref": {
     "key": "__ref",
     "value": "https://app.surveygizmo.com/",
     "type": "url"
     },
     "__passthrough": {
     "key": "__passthrough",
     "value": "true",
     "type": "url"
     },
     "__sgbrwsrid": {
     "key": "__sgbrwsrid",
     "value": "3b687213c10b8736fb139994fc7001bb",
     "type": "url"
     }
     },
     "ip_address": "47.36.35.100",
     "referer": "https://app.surveygizmo.com/",
     "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36",
     "response_time": 45,
     "data_quality": [],
     "longitude": "0.0",
     "latitude": "0.0",
     "country": "United States",
     "city": "Smyrna",
     "region": "GA",
     "postal": "30080",
     "dma": "524",
     "survey_data": {
     "3": {
     "id": 3,
     "type": "parent",
     "question": "Please select your Organization",
     "section_id": 1,
     "options": {
     "10003": {
     "id": 10003,
     "option": "Region",
     "answer": "Overseas"
     },
     "10004": {
     "id": 10004,
     "option": "State",
     "answer": "Test"
     },
     "10005": {
     "id": 10005,
     "option": "Organization",
     "answer": "Test"
     }
     },
     "shown": true
     },
     "6": {
     "id": 6,
     "type": "parent",
     "question": "Organization Lead Contact Info",
     "subquestions": {
     "7": {
     "id": 7,
     "question": "First Name",
     "type": "TEXTBOX",
     "parent": 6,
     "answer": "William"
     },
     "8": {
     "id": 8,
     "question": "Last Name",
     "type": "TEXTBOX",
     "parent": 6,
     "answer": "Test"
     },
     "9": {
     "id": 9,
     "question": "Title",
     "type": "TEXTBOX",
     "parent": 6,
     "answer": "Test"
     },
     "10": {
     "id": 10,
     "question": "Company Name",
     "type": "TEXTBOX",
     "parent": 6,
     "answer": ""
     },
     "11": {
     "id": 11,
     "question": "Street Address",
     "type": "TEXTBOX",
     "parent": 6,
     "answer": ""
     },
     "12": {
     "id": 12,
     "question": "Apt/Suite/Office",
     "type": "TEXTBOX",
     "parent": 6,
     "answer": ""
     },
     "13": {
     "id": 13,
     "question": "City",
     "type": "TEXTBOX",
     "parent": 6,
     "answer": ""
     },
     "14": {
     "id": 14,
     "question": "State",
     "type": "TEXTBOX",
     "parent": 6,
     "answer": ""
     },
     "15": {
     "id": 15,
     "question": "Zip",
     "type": "TEXTBOX",
     "parent": 6,
     "answer": ""
     },
     "16": {
     "id": 16,
     "question": "Country",
     "type": "TEXTBOX",
     "parent": 6,
     "answer": ""
     },
     "17": {
     "id": 17,
     "question": "Email Address",
     "type": "TEXTBOX",
     "parent": 6,
     "answer": "test@gmail.com"
     },
     "18": {
     "id": 18,
     "question": "Phone Number",
     "type": "TEXTBOX",
     "parent": 6,
     "answer": "4044875974"
     },
     "19": {
     "id": 19,
     "question": "Fax Number",
     "type": "TEXTBOX",
     "parent": 6,
     "answer": ""
     },
     "20": {
     "id": 20,
     "question": "Mobile Phone",
     "type": "TEXTBOX",
     "parent": 6,
     "answer": ""
     },
     "21": {
     "id": 21,
     "question": "URL",
     "type": "TEXTBOX",
     "parent": 6,
     "answer": ""
     }
     },
     "section_id": 3,
     "shown": true
     },
     "22": {
     "id": 22,
     "type": "parent",
     "question": "CEO Contact Info",
     "subquestions": {
     "23": {
     "id": 23,
     "question": "First Name",
     "type": "TEXTBOX",
     "parent": 22,
     "answer": "Will"
     },
     "24": {
     "id": 24,
     "question": "Last Name",
     "type": "TEXTBOX",
     "parent": 22,
     "answer": "Clein"
     },
     "25": {
     "id": 25,
     "question": "Title",
     "type": "TEXTBOX",
     "parent": 22,
     "answer": ""
     },
     "26": {
     "id": 26,
     "question": "Company Name",
     "type": "TEXTBOX",
     "parent": 22,
     "answer": ""
     },
     "27": {
     "id": 27,
     "question": "Street Address",
     "type": "TEXTBOX",
     "parent": 22,
     "answer": ""
     },
     "28": {
     "id": 28,
     "question": "Apt/Suite/Office",
     "type": "TEXTBOX",
     "parent": 22,
     "answer": ""
     },
     "29": {
     "id": 29,
     "question": "City",
     "type": "TEXTBOX",
     "parent": 22,
     "answer": ""
     },
     "30": {
     "id": 30,
     "question": "State",
     "type": "TEXTBOX",
     "parent": 22,
     "answer": ""
     },
     "31": {
     "id": 31,
     "question": "Zip",
     "type": "TEXTBOX",
     "parent": 22,
     "answer": ""
     },
     "32": {
     "id": 32,
     "question": "Country",
     "type": "TEXTBOX",
     "parent": 22,
     "answer": ""
     },
     "33": {
     "id": 33,
     "question": "Email Address",
     "type": "TEXTBOX",
     "parent": 22,
     "answer": "test@gmail.com"
     },
     "34": {
     "id": 34,
     "question": "Phone Number",
     "type": "TEXTBOX",
     "parent": 22,
     "answer": ""
     },
     "35": {
     "id": 35,
     "question": "Fax Number",
     "type": "TEXTBOX",
     "parent": 22,
     "answer": ""
     },
     "36": {
     "id": 36,
     "question": "Mobile Phone",
     "type": "TEXTBOX",
     "parent": 22,
     "answer": ""
     },
     "37": {
     "id": 37,
     "question": "URL",
     "type": "TEXTBOX",
     "parent": 22,
     "answer": ""
     }
     },
     "section_id": 3,
     "shown": true
     }
     }
     }
    }
  • ChristianAbata Profile Picture
    8,949 Most Valuable Professional on at
    Re: Compare Value from Parse JSON

    hi @wclein  what you can do is try deleting the type.

    For example

    "properties": {
     "type": {
     
     }

    instead

    "properties": {
     "type": {
     "type": "string"
     }

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 788 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 452 Moderator

#3
developerAJ Profile Picture

developerAJ 302

Last 30 days Overall leaderboard