eiiches / jackson-jq

jq for Jackson Java JSON Processor
Other
282 stars 37 forks source link

Fix array indexing by empty array and refactor indices/1 #238

Closed itchyny closed 1 year ago

itchyny commented 1 year ago

This PR fixes array indexing by array ([1,2,3,2,1] | .[[]] should emit []). This operation behaves the same as indices/1 function. I looked into the function implementation and refactored a bit.

eiiches commented 1 year ago

Thanks for the PR and sorry for the late response. I'll take a look tomorrow, please give me a bit more time :pray:

eiiches commented 1 year ago

I checked the jq behavior and you are totally right. Thank you for fixing this!