I am parsing through each dictionary inside main list to get the data related to particular "version". Is there any effective way to do it ?
app.html:
<select ng-model="versionKey">
<option ng-repeat="model in models">{{ model.version }}</option>
</select>
<div ng-repeat="stuff in models">
<div ng-if="stuff.version == versionKey">
<ul>
<li ng-repeat="instance in stuff.records">
{{ instance }}
</li>
</ul>
</div>
</div>
json file:
[
{"records": [{"model": "bada", "crashes": 1}], "apikey": "2", "_id": "52c0417ce1382321ef038106", "version": "6"},
{"records": [{"model": "sam", "crashes": 1}], "apikey": "2", "_id": "52c0417ce1382321ef038109", "version": "4"}
]