jaq icon indicating copy to clipboard operation
jaq copied to clipboard

Implement indices, index and rindex.

Open kklingenberg opened this issue 1 year ago • 0 comments

This PR implements indices and copies jq's derivative implementations of index and rindex according to the spec here. Note that jq has TODO's related to performance on said implementations, so perhaps you'd want to close this PR and wait for a performant version of these filters.

~Also, the behaviour of jq's indices varies slightly when dealing with strings. I reported/asked about it here: https://github.com/jqlang/jq/issues/3030~ (my mistake; jq solved the issue in 1.7)

Closes #154

kklingenberg avatar Feb 04 '24 01:02 kklingenberg