Converts an object literal with deeply nested nodes to a simple key/value object