Hi all,
Wanted to know if we can add conditional statement inside json payload?
Thanks in advance…
Hi all,
Wanted to know if we can add conditional statement inside json payload?
Thanks in advance…
I have one json payload as:
{
id: “123”,
name: “test”,
dob : “1999-9-9”
education:[
{
class : “X”,
schoolname: “random”
},
{
degree: “some”,
college: “test”
},
{
designation : “trainer”,
employer : “abc”
}
]
place : “test”
}
regarding education field : If person’s age less than 16 then I want to input only school details. If it is in betwwen 16 and 22 then i want to input both school and college. if age is grater than 22 then I want to input all the fields. Is it possible to add condition in json payload without adding condition outside of this json payload?
In JSON, you cannot directly embed conditions or logic because JSON is a data format, not a programming language. However, you can process and modify the JSON data according to the conditions in UiPath or any other programming environment.
Deserialize JSON
activity to convert the JSON string into a JObject so you can manipulate it.Thanks,
Ashok
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.