**This is the code of my queryBuilder**
In database I have two tables:

1. enquiry\_table (contains statusId(@ManyToOne) which is a foreign key for enquiry\_status\_table)
2. enquiry\_status\_table

```js
 async findByLocation(qParams) {
    return await getRepository(Enquiry).createQueryBuilder('enq')
      .where({ location: qParams.location })
      .select(['enq.id', 'enq.location', 'enqStatus.name'])
      .leftJoin('enq.status', 'enqStatus')
     .getMany()
  }
```

With the above code I get following Results

```js
{
    "id": 5,
    "location": "Karnataka",
    "status": {  <-- This is what I m getting currently with the above code
        "name": "CANCELLED"
    }
  },
```

```js
{
    "id": 5,
    "location": "Karnataka",
    "status": "CANCELLED" <-- this is what I m expecting
},
```