I'm looking for a way to make a type/interface from this API response, The nested comments property is challenging for me.
"data": [
{
"id": 1,
"comment": "This is the comment to another comment",
"approved": true,
"archived": 0,
"pinned": 0,
"reported": 0,
"created_at": "2022-06-24T06:12:25.000000Z",
"updated_at": "2022-06-24T06:12:25.000000Z",
"comments": [
{
"id": 2,
"comment": "This is the comment to another comment",
"approved": true,
"archived": 0,
"pinned": 0,
"reported": 0,
"created_at": "2022-06-24T06:12:37.000000Z",
"updated_at": "2022-06-24T06:12:37.000000Z",
"comments": [
{
"id": 3,
"comment": "This is the comment to another comment",
"approved": true,
"archived": 0,
"pinned": 0,
"reported": 0,
"created_at": "2022-06-24T06:32:52.000000Z",
"updated_at": "2022-06-24T06:32:52.000000Z",
"comments": [],
"commented": {
"id": 1,
"first_name": "Test",
"last_name": "Testi",
"full_name": "Test Testi"
}
},
{
"id": 4,
"comment": "This is the comment to another comment",
"approved": true,
"archived": 0,
"pinned": 0,
"reported": 0,
"created_at": "2022-06-24T06:32:57.000000Z",
"updated_at": "2022-06-24T06:32:57.000000Z",
"comments": [],
"commented": {
"id": 1,
"first_name": "Test",
"last_name": "Testi",
"full_name": "Test Testi"
}
}
],
"commented": {
"id": 1,
"first_name": "Test",
"last_name": "Testi",
"full_name": "Test Testi"
}
}
],
"commented": {
"id": 1,
"first_name": "Test",
"last_name": "Testi",
"full_name": "Test Testi"
}
},
],