I build a Model and parse JSON data but there is problem of parsing.
My JSON data looks like this:
{
"receiptNo": [
{
"_id": "5ba6101964991b2f44e1c9cf",
"receiptNo": "21471",
"rollno": 122,
"bankcode": 2,
"userid": "rifat",
"__v": 0
}
]
}
And, this is my model for angular:
export class ReceiptModel
{
receiptNo: String;
}
Please note that I want to get the receiptNo but unable to get.
How to declare model for this specific JSON?
receiptNois an array, not a string.