1👍
✅
consumers
in the response is an object and not an array. Therefore, you don’t need to convert anything into an array, and surely no need to use *ngFor
if you don’t have to.
Just make sure that consumersInfo
is a public property, and then in your template write the following:
<li class="list-group-item">
<p><i>Id:</i> {{ consumersInfo.id }}</p>
<p><i>Gender:</i> {{ consumersInfo.gender }}</p>
<p><i>Age Group:</i> {{ consumersInfo.age }}</p>
...
Source:stackexchange.com