GeoServe Interview Question

Implement a function similar to lodash get.