I have the following JSON data and I'd like for Angular to do an ngRepeat for each key inside Specification and be displayed in the same order as they are in the object:
"Specification": {
"Screen": "15.4\" Retina display",
"Resolution": "2880 x 1800",
"HDD": "512GB SSD",
"RAM": "16GB RAM",
"CPU": "Intel Core i7 2.30 Ghz Processor",
"Software": "Mac OS X 10.9 Mavericks"
}
This is my HTML:
<ul>
<li ng-repeat="(key, value) in selectedProduct.Specification">
<span ng-class="{{key | lowercase}}">{{value}}</span>
</li>
</ul>
The above code outputs the data in a random order, not the order of appearance in the array.