Using dot in form element names and passing true to expandNames parameter in toJson() function, we can receive nested objects.