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

Wrong array conversion with [0] #27

Closed
vladshcherbin opened this issue Jul 12, 2017 · 0 comments
Closed

Wrong array conversion with [0] #27

vladshcherbin opened this issue Jul 12, 2017 · 0 comments
Assignees
Labels

Comments

@vladshcherbin
Copy link

Array conversion is inconsistent with field.0 and field[0]. Example:

const object = {}
const objectTwo = {}

dot.str('object.fields.0.subfield', 'value', object)
dot.str('object.fields.1.subfield', 'value1', object)
dot.str('object.fields[0].subfield', 'value', objectTwo)
dot.str('object.fields[1].subfield', 'value1', objectTwo)

console.log(object)
console.log(objectTwo)

Output:

screen shot 2017-07-12 at 2 38 11 pm

As you can see, the first object is correct, the second one is not.

@rhalff rhalff added the bug label Jul 19, 2017
@rhalff rhalff self-assigned this Jul 19, 2017
@rhalff rhalff closed this as completed in 739c111 Nov 2, 2019
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