Result, creates an array of values corresponding to paths of the object. If value is a function, returns result of calling function
object
(object): input objectpath
(Array|string): string or an array of strings describing paths to be returned from an object[defaultValue]
(*): value returned when path resolves undefined
(*): value found by object paths in object, or returns defaultValue if provided and return would otherwise be undefined
const obj = { front: [1, 3, 5], back: [() => 15, () => 19] };
console.log(objects.result(obj, 'back[1]'));
> 19