Re: Extracting data from jsonb array?

From: Ken Tanzer <ken(dot)tanzer(at)gmail(dot)com>
To: Steve Baldwin <steve(dot)baldwin(at)gmail(dot)com>
Cc: PG-General Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Extracting data from jsonb array?
Date: 2020-12-07 23:18:00
Message-ID: CAD3a31VkNAbY4fvgJ9qU68MFmxt_amgRQjU4Ugt3_Q6k0y0MQw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Dec 7, 2020 at 3:12 PM Steve Baldwin <steve(dot)baldwin(at)gmail(dot)com>
wrote:

> Try:
>
> select _message_body->'Charges'->>'Name' from ...
>
>
Hi Steve. I tried that again, and that returns a NULL value for me. I
believe that is because Charges holds an array of two elements, each of
which has a Name element. Though my terminology might not be correct!

Cheers,
Ken

>>
>>
>>
>>
>> --
>> AGENCY Software
>> A Free Software data system
>> By and for non-profits
>> *http://agency-software.org/ <http://agency-software.org/>*
>> *https://demo.agency-software.org/client
>> <https://demo.agency-software.org/client>*
>> ken(dot)tanzer(at)agency-software(dot)org
>> (253) 245-3801
>>
>> Subscribe to the mailing list
>> <agency-general-request(at)lists(dot)sourceforge(dot)net?body=subscribe> to
>> learn more about AGENCY or
>> follow the discussion.
>>
>

--
AGENCY Software
A Free Software data system
By and for non-profits
*http://agency-software.org/ <http://agency-software.org/>*
*https://demo.agency-software.org/client
<https://demo.agency-software.org/client>*
ken(dot)tanzer(at)agency-software(dot)org
(253) 245-3801

Subscribe to the mailing list
<agency-general-request(at)lists(dot)sourceforge(dot)net?body=subscribe> to
learn more about AGENCY or
follow the discussion.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2020-12-07 23:22:19 Re: Extracting data from jsonb array?
Previous Message Steve Baldwin 2020-12-07 23:12:41 Re: Extracting data from jsonb array?