pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andreas Joseph Krogh <andreas@visena.com>
To: pgsql-general@lists.postgresql.org
Subject: Delete values from JSON
Date: Fri, 17 Mar 2023 08:56:51 +0100 (CET)
Message-ID: <VisenaEmail.bc7.d4292f85844d033f.186ee909d72@origo01.app.internal.visena.net> (raw)



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 Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
andreas@visena.com <mailto:andreas@visena.com>
www.visena.com <https://www.visena.com;
 <https://www.visena.com;

view thread (5+ messages)  latest in thread

Message-ID: <VisenaEmail.bc7.d4292f85844d033f.186ee909d72@origo01.app.internal.visena.net>
Permalink:  ../VisenaEmail.bc7.d4292f85844d033f.186ee909d72@origo01.app.internal.visena.net/
Also on:    postgresql.org/message-id/VisenaEmail.bc7.d4292f85844d033f.186ee909d72@origo01.app.internal.visena.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: andreas@visena.com
  Subject: Re: Delete values from JSON
  In-Reply-To: <VisenaEmail.bc7.d4292f85844d033f.186ee909d72@origo01.app.internal.visena.net>
  References: <VisenaEmail.bc7.d4292f85844d033f.186ee909d72@origo01.app.internal.visena.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox