On Wed, Sep 30, 2026 at 11:48 AM Marcos Pegoraro <[email protected]> wrote:
> Em seg., 17 de ago. de 2026 às 09:04, Marcos Pegoraro <[email protected]> > escreveu: > >> Additional example of == operator being used like ANY >> > > I insist on this, there is no documentation on how to find an array of > values in a JSON object. > > select jsonb_path_query_array('[5,6,7,8,9]', '$[*] ? (@ == $arr)','{"arr": > [2,5,8]}') > ------- > [5, 8] > > I feel like simply including an example here is insufficient. There isn't anything special about == going on here; you can substitute >= and get a valid result. I don't mind the example but this entire behavior of value == value when the lefthand value is scalar and the righthand value is an array (maybe object?) appears undefined. The sentence there - "(this, and the other comparison operators, work on all JSON scalar values)" - in fact implies that the array version shouldn't work. David J.
