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

$.me.1 vs $.me[1] #8

Open
listentorick opened this issue May 10, 2016 · 1 comment
Open

$.me.1 vs $.me[1] #8

listentorick opened this issue May 10, 2016 · 1 comment
Labels

Comments

@listentorick
Copy link

You seem to follow a different approach to selecting items in an array than this http://goessner.net/articles/JsonPath/

$.me.1 vs $.me[1]

Any particular reason?

I'm considering forking this project to support this approach. Is this something you would merge back in?

@zordius
Copy link
Owner

zordius commented May 11, 2016

I support foo.bar style path just because it's more simple and straightforward in JavaScript, but I think foo['bar'] is also good. Here are some points:

  1. To parse foo['bar'][0] will cost a little more than foo.bar.0
  2. The style foo['bar'][0] is a little bit longer than foo.bar.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants