MiSawa / xq

Pure rust implementation of jq
MIT License
333 stars 18 forks source link

Fix deletion of negative index of array out of range #144

Closed itchyny closed 2 years ago

itchyny commented 2 years ago

Deletion of paths with negative index out of range should not raise error.

❯ jq -n '[1,2,3] | del(.[-10])'
[
  1,
  2,
  3
]

❯ xq -n '[1,2,3] | del(.[-10])'
Error: InvalidIndex(-10)