But what about string()? Is there some reason it doesn’t unwrap?
david=# select jsonb_path_query('[-2,5]', '$.string()'); ERROR: jsonpath item method .string() can only be applied to a bool, string, numeric, or datetime value
However, I do see a test[1] for this behavior, so maybe there’s a reason for it?
Adding Andrew.
I'm willing to call this an open item against this feature as I don't see any documentation explaining that string() behaves differently than the others.