Skip to content

get

Dynamically get a nested value from an array or object with a string.

Usage

const person = {
name: "John",
friends: [{ name: "Jane" }],
};
get(person, "friends[0].name"); // => 'Jane'

Installation

Terminal window
npx atmx add helper get