Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request - Reverse-indexing of arrays #79

Open
jnanasagar opened this issue Jun 23, 2018 · 2 comments
Open

Feature Request - Reverse-indexing of arrays #79

jnanasagar opened this issue Jun 23, 2018 · 2 comments

Comments

@jnanasagar
Copy link

First of all, I would like to thank everyone for contributing to this project, it's really great and works very well. 👍

Feature :
Currently, we can access the first element of an array of JSON objects with indexing.
The first element of an array: array[0]
Nth element of an array: array[n]
Can we please add a feature to do reverse indexing of the array? This would be very useful when one would be aware of the length of an array.
Or access the last element of an array with index -1.

I would like to take up this task if it can be accepted.

@JoshuaC215
Copy link
Collaborator

Hi @jnanasagar, thank you for this! We would support this functionality but it is not in our current scope, so if you want to take it on please do!

Currently we retrieve elements from array with the underlying qntfy/jsonparser as seen here so you would want to add this functionality there and then make sure kazaam could pick up the new version (I can take care of that part for you). I believe the underlying code you'd want to update is here and we would also need a few new test cases to cover this in jsonparser. If you want to submit the MR to qntfy/jsonparser and tag me I'm happy to review.

Thank you!!

@jnanasagar
Copy link
Author

jnanasagar commented Jun 30, 2018 via email

@thomas-tharp thomas-tharp changed the title Feature Request Feature Request - Reverse-indexing of arrays Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants