I am trying to display Nested Array Json data with configurable attributes 
only instead of all attributes, but it's displaying [Object, Object] for 
array property like "roomTypes".

Kindly help to display value instead Object.


x.component.ts ->
//getItemById() service call
res.json().data

x.constant.ts -> 
{jsonAttributeNames:["name","roomTypes"]}

x.component.html -> 
<table>....
<tbody>
<tr>                 
   <td *ngFor="let attributeName of jsonAttributeNames" >
                        <div *ngIf="data"> {{data[attributeName]}}</div>
                    </td>
</tr>
</tbody>
</table>

Json Data ->
{"name":"test","roomTypes":[{"Name":"living room"},{"Description":"Mock 
Description"},{"Name":"Bathroom"},{"Description":"Mock Description"}]}

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to