Answer the question
In order to leave comments, you need to log in
How do I convert the received json into an array that I could run through ngFor?
I get this Json from the server:
{
"code": 0,
"error": null,
"data": [
{
"id": 2,
"name": "A"
"Numbers": []
},
{
"id": 3,
"name": "B,
"description": "V",
"Numbers": []
}
]
}
result.json().data
Answer the question
In order to leave comments, you need to log in
No need for result.json()
The data is already there.
result.data is sufficient.
(assuming you are using Angular > 4.3)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question