My task involves managing a collection of select elements with options specified in a JSON object. Each option should have its selected state preserved as a boolean value. This means that when a user chooses an option, the "selected" value for that option should change to "true", while any previously selected option will have its value changed to "false".
<div ng-repeat="choice in choices">
{{choice.name}}:
<select>
<option value="" ></option>
<option ng-repeat="option in choice.options" ng-selected="option.selected">{{option.name}}</option>
</select>
</div>
Here is an example of how an option would be structured:
{id=1, name='option1', selected=false}