I have json data as given below:
[ {"id":1, "name":"name_1"}, {"id":2, "name":"name_2"}, {"id":3, "name":"name_3"} ]
I want to remove id:3 from the list of json data to get output like this:
[ {"id":1, "name":"name_1"}, {"id":2, "name":"name_2"}, ]
It can be done using
remove_jsonb_object
, takingjsonb_data
andtarget_id
as input parameters and it returns new jsonb data, but without target_id.