As an example, I have this basic table structure:
CREATE TABLE test (id serial, info json);
INSERT INTO test(info)
VALUES ('{
"dept":[
{
"name":"abc",
"desc":"hello",
"enabled":false
},
{
"name":"xyz",
"desc":"hello",
"enabled":false
}
]
}');
I want to update and set "enabled":true
where "name"
is "abc"
.