get

Gets the value at path of object. If the resolved value is undefined, the defaultValue is returned in its place.

Use it for paths only known at runtime. For static paths, prefer optional chaining (obj?.a?.b).

Example