I have this response from a restapi and wnat to access the replies inside of comments i do have the model from quicktype.io but don't know how to iterate and fetch the data.
"data": {
"_id": "61ee65fd92a48c7b10779f24",
"topicName": "Test Topic",
"description": "<p>Test Discussion</p>",
"createdByName": "Admin",
"comments": [
{
"_id": "622740a70fdfbb1bdd00232b",
"comment": "post commnet test",
"commentedById": "611cb5ecaf1a1bbc858d4d13",
"user": [
{
"title": "Mr",
"firstName": "John",
"lastName": "Cart",
"userID": "USER1000022",
"_id": "611cb5ecaf1a1bbc858d4d13"
}
],
"replies": []
},
{
"_id": "620d05382773643acd49177b",
"comment": "test message",
"commentedById": "611cb5ecaf1a1bbc858d4d13",
"commentedByName": "Mr. John Cart",
"user": [
{
"title": "Mr",
"firstName": "John",
"lastName": "Cart",
"userID": "USER1000022",
"_id": "611cb5ecaf1a1bbc858d4d13"
}
],
"replies": [
{
"_id": "6227351b0fdfbb099800232a",
"comment": "test msg",
"commentedById": "611cb5ecaf1a1bbc858d4d13",
"commentedByName": "Mr, john cart",
"replyUser": [
{
"title": "Mr",
"firstName": "John",
"lastName": "cart",
"userID": "USER1000022",
"_id": "611cb5ecaf1a1bbc858d4d13"
}
]
}
],
},
any help or documentations/ suggestions / guides would be helpfull
Thank you