Say I have a JSON,
{
"x" : 1,
"y" : 2
}
My need here is to add a value, if y is 2 set the value for y as 2 in JSON or else set as 3.
Note: I have to make this operation inside JSON itself. Do we have any logical or ternary operators that can be used inside JSON?