Flattens deeply nested object into a single level object.