get-from
Safely returns the value(s) in a nested object/array structure.
Having to do boilerplate checks such as obj["a"] && obj["a"]["b"] && obj["a"]["b"]["c"]
complicates code!
Instead all you need to do is provide you desired final path and optional default value.
Usage
; // multi-level objects; // => "🎉"; // => "🎉"; // => undefined; // => "😥" // array index access; // => { b: "🎉" } // multi-map array access; // => ["🎉", "🎂"]; // => [["🎉"], ["🎂"]] // all together!; // => ["🎉"]