On Mon, Dec 09, 2019 at 09:37:23AM +0100, Jan Przemysław Wójcik wrote:
> Yes, there is the only object with the attribute 'key' and its value
> should be returned. Note, that a non-recursive path on the same JSON
> correctly returns a single row:
>
> select jsonb_path_query('{"data": [{"key": "value"}]}', '$.*.key')
>
> jsonb_path_query
> ------------------
> "value"
> (1 row)
Yeah, that result is right. Something looks wrong regarding the
lookup of an array's elements when doing a recursion. Let's wait a
bit to see if Nikita or Alexander have anything to share as they
implemented the feature. If not, I'll try to take a closer look at
this issue.
--
Michael