Gets a nested value from an object using dot or bracket notation.
The object to extract the value from
The path to the value using dot or bracket notation
Optional
The default value to return if the path does not exist
The extracted value or the default value
const val = extract(user, 'profile.address.zip', '00000'); Copy
const val = extract(user, 'profile.address.zip', '00000');
Gets a nested value from an object using dot or bracket notation.