extract property value from set of json arrays

From: AC Gomez <antklc(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: extract property value from set of json arrays
Date: 2020-04-07 02:21:24
Message-ID: CABtmK-iYO9aSObk6DcNPBdX_fL+Hn3F+Mu32PRaoNJOB=hyS1Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have the following in a postgresql table
row 1: {"a": 1, "b": "[{"c": "123", "d":"456", "e": "789"}, {"c": "222",
"d":"111", "e": "000"} ]"}
row 2: {"a": 2, "b": "[{"c": "XXX", "d":"YYY", "e": "ZZZ"}, {"c": "666",
"d":"444", "e": "333"} ]"}

How do I pullout all "b":"e" values and end up with this result:
789
000
ZZZ
333

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2020-04-07 02:44:22 Re: How to unnest nested arrays
Previous Message Guyren Howe 2020-04-07 01:11:49 How to unnest nested arrays