How to write "If" condition in JSON parsing **refer below example**

Hi - How to “if” condition in below example of JSON.

In below JSON Object “list” is an array. I need to Parse this JSON. But for that I need to write “if” condition.


if “list” is an array then parse this JSON. ( I need help on how to write this condition)


“formula”: “XXXX”,
“id”: 343,
“name”: “XXXX”,



    "id": 400,  
    "name": "XXXX",



Checking the Datatype of the value from list would allow to do the conditional Fork
The gettype Method is usually used for this

Give a try on Debugging an Type into the watch Expression yourJObjextvar(“list”).gettype IT should Return JArray


It worked using:
excute code
execute else code

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.