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

Converted array turns into object #26

Open
evancarey opened this issue Jul 11, 2017 · 0 comments
Open

Converted array turns into object #26

evancarey opened this issue Jul 11, 2017 · 0 comments

Comments

@evancarey
Copy link

Was hoping I'd get back what I started with...

var a = [{'id':'xxx'}];
console.log(dot.object(dot.dot(a)));

Object {
0: Object {
id: 'xxx'
}
}

I understand when dot.object() is called it knows nothing about the argument passed to dot.dot() and assuming properties are actually array indices just because they're ints might be problematic. But, if they're all ints and contiguous maybe it'd be a safe assumption?

https://codepen.io/ecarey/pen/owJLJO

Kudos on the library by the way. I appreciate your work.

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

1 participant