I m new in using jsonb in postgresql.
I have a following structure
[
{
"Id":1,
"Name":"Emilia"
},
{
"Id":2,
"Name":"sophia"
},
{
"Id":3,
"Name":"Anna"
},
{
"Id":4,
"Name":"Marjoe"
}
]
- This structure is stored in jsonb column (items).I need to append
{"Id":5,"Name":"Linquin"}
in this array.and set it back to jsonb column items.
I need something like this.
[
{
"Id":1,
"Name":"Emilia"
},
{
"Id":2,
"Name":"sophia"
},
{
"Id":3,
"Name":"Anna"
},
{
"Id":4,
"Name":"Marjoe"
},
{
"Id":5,
"Name":"Linquin"
}
]
- And please let me know any way to delete objects based on id....
Appreciate any help.Thanks...