I have JSON array structure like below.
{
"appName": "MyApp",
"restricted_mode": true,
"some_array": [
{ "module_1": "abc", "type": "internal", "company": "Google", "storage": "cloud" },
{ "module_2": "xyz", "type": "external", "company": "Amazon", "storage": "local" },
]
}
Above works great but is it possible to set type of module_2 to external only if restricted_mode is set to false? How can I do an inline ternary operation or if else here?