The target object to retrieve the value from.
Optional
key: string | number | string[]The key in dot notation or path to the property.
Optional
fallback: unknownThe fallback value if the property is not found.
The value of the property or the fallback value.
const object = {users: {name: ['Taylor', 'Otwell']}};
dataGet(object, 'users.name.0') // 'Taylor'
Generated using TypeDoc
Retrieves the value of a property from a given object using a key. If the key is not provided, it returns the target object itself.