I have a JSONB column "deps" like this
[
[{
"name": "A"
}, "823"],
[{
"name": "B"
}, "332"],
[{
"name": "B"
}, "311"]
]
I want to set a column "stats" to NULL for all rows where the JSON array in the column "deps" contains a tuple with "name" "B". In the example above the column "deps" has two such tuples. Is it possible?
The dictionary {"name": "B"} always comes first in the tuple.
Would the same search in this JSON be faster:
[{
"id": {
"name": "A"
},
"value": "823"
}, {
"id": {
"name": "B"
},
"value": "332"
},
{
"id": {
"name": "B"
},
"value": "311"
}
]