Skip to content

Document property order issue with pluck #703

Closed
@CrossEye

Description

@CrossEye

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]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions