Amazon·Software Engineer·Technical Phone Screen
- Implement a function get(object, path) that retrieves a value from an arbitrarily nested structure of maps and arrays, where the path string uses dot notation for keys and bracket notation for array indices (e.g. "a.b[1].c.d[2][13]").
“My first instinct was to split on dots and call it a day, which obviously breaks the moment you hit a bracket.”