I have two scenarios that I am trying to figure out. I have a jsonb column in a table with a structure like this:
{
"1": {
"a": 0.084,
"b": 0.084,
"c": 0.084
},
"2": {
"a": 0.078,
"b": 0.0814,
"c": 0.078
},
"3": {
"a": 0.0928,
"b": 0.0975,
"c": 0.0975
}
}
If I wanted to change the value of "3":{"b":} how would I go about doing it? I tried looking at functions like jsonb_set(), but that seemed like I would have to copy the entire jsonb object and re-paste it in every time I wanted to update one value.
The second issue I want to solve is if I want to delete the entire "3":{} object, the only solution I can seem to find is using jsonb_set() again.
Thanks for your help!