Hi i am getting Json Response Body from a get request in REST request.
{
"outputData": {
"data": {
"leaveList": [
{
"leaveTypeID": 1,
"leaveBalance": 2
},
{
"leaveTypeID": 2,
"leaveBalance": 9
}
]
}
}
}
I want to get leaveBalance of leaveType 2.
Index of the leaveTypeID keep changing.
Thanks
You can do it by iterating through
leaveListJsonArray.This will print;
You can assign values dynamically to
leaveTypeIdand get theleaveBalanceyou want.