When trying to build a model and parse JSON data, I am facing an issue with the parsing process.
The structure of my JSON data is as follows:
{
"receiptNo": [
{
"_id": "5ba6101964991b2f44e1c9cf",
"receiptNo": "21471",
"rollno": 122,
"bankcode": 2,
"userid": "rifat",
"__v": 0
}
]
}
Below is the model I have defined for Angular:
export class ReceiptModel
{
receiptNo: String;
}
Although I am trying to access the receiptNo
property, I am not able to retrieve it successfully.
Could you please advise on how to declare a model specifically for this type of JSON data?