I'm having a problem handling Json in Angular.
The Json is:
{
"0": {
"id": "2287947",
"chattime": "1544102153",
"chat": "Finalizado",
"chattype": "text",
"media": "",
"outgoing": "0",
"bot": "0",
"unread": "1",
"email_created": ""
},
"1": {
"id": "2287931",
"chattime": "1544102141",
"chat": "asdasdasd",
"chattype": "text",
"media": "",
"outgoing": "1",
"bot": "0",
"unread": "0",
"email_created": "api"
}
}
And in Angular's html I have a for
<div *ngFor="let chat of chats">
{{chat.id}}
</div>
But he tells me this error:
ERROR Error: "Can not find a differ supporting object '[object Object]' of type 'object'. NgFor only supports binding to Iterables such as Arrays."
Thanks