Hello
> -Original Message-
> From: pgsql-general-ow...@postgresql.org
> [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Michael Paquier
> Sent: Montag, 8. August 2016 05:24
> To: Alex Magnum
> Cc: Postgres General
> Subject: Re: [GENERAL] Extract data f
On Mon, Aug 8, 2016 at 12:08 PM, Alex Magnum wrote:
> How can I convert that into one row each based on status; for example if I
> only want to have the active modules.
You can use jsonb_each to decompose that:
=# select key, (value::json)->'status' from jsonb_each('{
Hi,
I need some help with extracting data from json.
I have the following jsonb field
modules
{
"accounts": {"status": true},
"admin":{"status": true},
"calendar": {"status": false},
"chat": {"status": true},
"contacts": {"status": true},
"dashboard":