Skip to content

pick should allow deep paths? #3336

@WickyNilliams

Description

@WickyNilliams
var object = { 'a'1, 'b''2', 'c'{ d : 3 }};
 
_.pick(object, ['a', 'c.d']);

I'd expect this to return:

{
  a : 1,
  d : 3
}

but it actually returns

{
  a : 1,
  c{
    d : 3
  }
}

which is equivalent to _.pick(object, ["a", "c"])

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions