Function at

Creates an array of values corresponding to paths of object.

1.0.0

const object = { 'a': [{ 'b': { 'c': 3 } }, 4] }

at(object, ['a[0].b.c', 'a[1]'])
// => [3, 4]
  • Type Parameters

    • T

    Parameters

    • object: Dictionary<T> | NumericDictionary<T>

      The object to iterate over.

    • Optionalpaths: PropertyPath[]

      The property paths to pick.

    Returns T[]

    Returns the picked values.