Function DeepGet
Parameters
- obj: { [key: string]: any }
The object from which the value is to be retrieved.
- key: string
The key in dot notation representing the path to the value.
Optionaloptions: { sep: string }Optional settings.
sep: string
Custom key separator (default:
'.').
Returns any
The value at the specified key if it exists, or
undefinedif the key is not found or an error occurs.- obj: { [key: string]: any }
Retrieves a value from a nested object using a dot notation key.
This function will never throws any error if there is a problem with the input type. It will return
undefinedinstead. This also means that if the key is not found, the function will returnundefinedinstead ofnullespecially when working on JSON data.