Added support for nested objects.