Added support for nested objects

Objects with deep nodes will be flattened to single-level.