The json response I get from an API is in this format:
{
"bill_id": 110,
"billdate": "2021-06-23",
"amount": 5500,
"vendors": {
"vendor_id": 7,
"vendor_name": "ABC pvt ltd",
}
}
So I am creating an interface to map with response.
export interface BillModel{
bill_id:number,
billdate:string,
amount: number,
vendors:object
}
I don't know how to make the vendors field and object with an interface too. [vendor_id and vendor_name]
That way I can map the http response properly
return this.http.get<BillModel[]>(this.getbillurl);
I know it is very basic but I am in learning the phase. Please suggest.