JSON path wild cards?

From: Dennis <dennisr(at)visi(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: JSON path wild cards?
Date: 2015-11-24 04:39:52
Message-ID: 45DB8C41-13C9-466D-AA1E-29A32B259D3A@visi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Is there a way to specify a wild card in a json path?

For example I have the following json doc:

[ {“a”:1,”b”: [ { “x”: 7,”y”:8,”z”:9} ] }, {“a”:2,”b”: [ { “x”: 4,”y”:5,”z”:6} ] }, … ]

How do I write a select clause that can return the values for all b x values something like [{b:x}] that would return all the b:x values in the array? e.g. 7 and 4 ...

Also is there a definition of the syntax of a proper json path for use in postgres?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Paquier 2015-11-24 05:03:26 Re: JSON path wild cards?
Previous Message anj patnaik 2015-11-24 00:33:50 Re: error messages not getting logged when running script from cron