postgrespro/jsquery

path/key for concrete index in array

niquola opened this issue · 2 comments

Could i construct path using concrete index in array:

'{"a":[{"b":1},{"b":2}]}' @@ 'a.0.b = 1'

You can't do that. Do you have a use-case for it?

I think index in array is quite semantic and could be considered as key.

For example i put info about children of person in array in birth-date order and i want search by first child