I have a string that carry the path of a nested json, where I need to update a value
var path = 'p_Data[0]["BusinessUnit"][0]["BusinessUnit"]'
if i evaluate this path I get value as 'Unit1'. I need to update the value 'Unit1' with 'Closed' and retrieve the original data ie, p_Data
I tried eval(path = 'Closed')
, but didn't work.
How to do this?