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

How to access data with array #87

Closed
mikeerickson opened this issue Oct 16, 2021 · 3 comments · Fixed by #82
Closed

How to access data with array #87

mikeerickson opened this issue Oct 16, 2021 · 3 comments · Fixed by #82

Comments

@mikeerickson
Copy link
Sponsor

mikeerickson commented Oct 16, 2021

Trying to do something like this:

const dotProp = require('dot-prop')

const data = {
  data: [{ price: 1234 }],
}

const result = dotProp.get(data, 'data[0].price')

But result is always undefined

Is this possible with this library? Or perhaps I should look at an alternative?

@sindresorhus
Copy link
Owner

It's coming soon: #82

@mikeerickson
Copy link
Sponsor Author

Hey @sindresorhus any movement on this issue? I have a hack working, but I would much rather roll with something I can trust.

@sindresorhus
Copy link
Owner

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

Successfully merging a pull request may close this issue.

2 participants