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

Document property order issue with `pluck` #703

Closed
CrossEye opened this Issue Sep 7, 2014 · 1 comment

Comments

3 participants
@CrossEye

CrossEye commented Sep 7, 2014

This is similar to #671, I think. It probably is not an issue that can be fixed, but should probably be documented with some caveat about property order access not being guaranteed in pluck.

var flintstonesA = {
    A: {name: 'fred', age: 40},
    B: {name: 'wilma', age: 36},
    C: {name: 'pebbles', age: 2}
};
var flintstonesB = {
    B: {name: 'wilma', age: 36},
    A: {name: 'fred', age: 40},
    C: {name: 'pebbles', age: 2}
};
_.pluck(flintstonesA, 'age'); //=> [40, 36, 2]
_.pluck(flintstonesB, 'age'); //=> [36, 40, 2]
@EtaiG

This comment has been minimized.

Show comment
Hide comment
@EtaiG

EtaiG Sep 8, 2014

Isn't this obvious, since that's really how iteration over object properties works in the browser?

EtaiG commented Sep 8, 2014

Isn't this obvious, since that's really how iteration over object properties works in the browser?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment