Flatten a possibly multi-dimensional object to a one-dimensional one by converting all nested keys to dot notation
The object to flatten
Optional
Track the recursion depth to prevent overflow
A flattened object
Flatten a possibly multi-dimensional object to a one-dimensional one by converting all nested keys to dot notation