'create nested dto in typeorm

I've a dto called updateUserDTO and the class looks like this

@IsString()
full_name: string;

@IsNumber()
mobile: string;

@IsEmail()
email: string;

@IsOptional()
location: string;

@IsOptional()
landmark: string;

@IsOptional()
city: string;

How can I create a nested DTO, so when my response I post to my controller looks like this

{
    "full_name": "xyz",
    "mobile": 1231341451,
    "email": "[email protected]",
    "address": {
         "location": "new avenue",
         "landmark": "Opp to St louis",
         "city": "Buffalo"  
    }
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source