Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

SOLVED: How to use *ngFor for json array to pick the value

Abhin Pai:

Here is my JSON data I want to print the "4th January 2018" as list header and description as the content of the list. How can I use the *ngFor this data

when i use *ngFor="let item of timeline data" I got an error


cannot find a differ supporting object '[object object]' of type 'object'. ngfor only supports binding to iterables such as arrays

Following is the data:


{
"msg": "All Timeline Data",
"data": {
"4th January 2018": [
{
"id": 294,
"description": "1st data",
"taken_on": "4th January 2018",
"status": "active",
"created_at": "2018-01-04 06:54:06",
"updated_at": "2018-01-04 06:54:06",
"deleted_at": null
},

"id": 295,
"description": "2nd data",
"taken_on": "4th January 2018",
"status": "active",
"created_at": "2018-01-04 06:54:06",
"updated_at": "2018-01-04 06:54:06",
"deleted_at": null
}
],
"5th January 2018": [
{
"id": 296,
"description": "3rd data",
"taken_on": "5th January 2018",
"status": "active",
"created_at": "2018-01-05 06:54:06",
"updated_at": "2018-01-05 06:54:06",
"deleted_at": null
}
]
}
}



Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots
This Question have been answered
HERE


This post first appeared on Stack Solved, please read the originial post: here

Share the post

SOLVED: How to use *ngFor for json array to pick the value

×

Subscribe to Stack Solved

Get updates delivered right to your inbox!

Thank you for your subscription

×