angularjs - ng-repeat: access key and value from JSON array object

后端 未结 4 637
粉色の甜心
粉色の甜心 2020-12-04 13:14

I have JSON Array object as shown below.

$scope.items = 
    [
    {Name: \"Soap\",  Price: \"25\",  Quantity: \"10\"},
    {Name: \"Bag\",   Price: \"100\",         


        
4条回答
  •  無奈伤痛
    2020-12-04 14:05

    Solution I have json object which has data

    [{"name":"Ata","email":"test@test1.com"}]
    

    You can use following approach to iterate through ng-repeat and use table format instead of list.

    • {{item.name}}: {{item.email}}

提交回复
热议问题