Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 597 Bytes

at.md

File metadata and controls

33 lines (21 loc) · 597 Bytes

objects.at

at(object, paths)

At, creates an array of values corresponding to paths of the object

Arguments

  1. object (object): input object
  2. paths (...(string|string[])): strings describing paths to be returned from an object

Returns

(array): array of values found by object paths in object

Example

const result = objects.at({ a: [13, 64], ']': 'b' });
console.log(result, 'a[1]');
> [64]