Hi,
If it is jsonb type, you can have a look at the documentation : https://www.postgresql.org/docs/14/functions-json.html
There are some examples :
Deletes a key (and its value) from a JSON object, or matching string value(s) from a JSON array.
|
Deletes all matching keys or array elements from the left operand.
|
Deletes the array element with specified index (negative integers count from the end). Throws an error if JSON value is not an array.
|
Deletes the field or array element at the specified path, where path elements can be either field keys or array indexes.
|
Regards
Romain MAZIÈRE romain.maziere@xxxxxxxxxxxxxxxxxxx +33.535.545.085 +33.781.46.36.96 https://sigmaz-consilium.fr
Hi, in PG-14, how do I delete the keys
"dunsNumber": "NaN"
:
{ "sessionId": "ce6fc9d0-5923-4d71-9f7e-ae60f35c45d6", "details": [ { "keyInformation": { "dunsNumber": "NaN", "organizationType": "LIMITED_COMPANY" } }, { "keyInformation": { "dunsNumber": "123", "organizationType": "LIMITED_COMPANY" } } ], "nisse": 123 }
So that the result becomes:
{ "sessionId": "ce6fc9d0-5923-4d71-9f7e-ae60f35c45d6", "details": [ { "keyInformation": { "organizationType": "LIMITED_COMPANY" } }, { "keyInformation": { "dunsNumber": "123", "organizationType": "LIMITED_COMPANY" } } ], "nisse": 123 }
Thanks.
--Andreas Joseph KroghCTO / Partner - Visena ASMobile: +47 909 56 963
Attachment:
OpenPGP_0x97C05C89DEC4129F.asc
Description: OpenPGP public key
Attachment:
OpenPGP_signature
Description: OpenPGP digital signature