- dataGet<T>(data?: undefined | Collection<Record<string, any>> | MaybeArray<Record<string, any>>, path: MaybeArray<string> | Collection<string>, defaultValue?: T): T | undefined
-
Parameters
-
data: undefined | Collection<Record<string, any>> | MaybeArray<Record<string, any>> = undefined
-
-
Optional
defaultValue: T
Returns T | undefined
Utility to safely access values on a deeply nested structure. If path doesn't exist, return the default value.
Example