On Thu, Jul 4, 2024 at 1:57 PM Vasu Nagendra <vasu@xxxxxxxxxxxxxxx> wrote:
SELECT '{"n": {"a-b": 1, "@ab": 2, "ab": 3}}'::jsonb @? '$ ? (@.n.a\-b >= 3)';
Which is better written as:
select '{"n": {"a-b": 1, "@ab": 2, "ab": 3}}'::jsonb @? '$ ? (@.n."a-b" >= 3)';
Using the same double-quotes you defined the key with originally.
The relevant documentation for jsonpath syntax is here:
David J.