I am dealing with a specific data structure:
$scope.personalityFields.traveller_type = [
{"id":1,"value":"Rude", "color":"red"},
{"id":2,"value":"Cordial", "color":"yellow"},
{"id":3,"value":"Very Friendly", "color":"green"},
];
Also, there is a select box set up like this:
<select map-value name="traveller_type" ng-init="init_select()" class="full-width" ng-model="traveller_type" ng-options="item as item.value for item in personalityFields.traveller_type">
<option value="" disabled selected> Choose ...</option>
</select>
I need assistance on how to automatically set the select box value based on a response that correlates to the "value" field within the JSON data. Specifically, if the response indicates "Rude" for traveller_type, then "Rude" should be displayed in the select box. Here is an example of the response object structure:
someObject = {
traveller_type: "Rude"
}
This information from the response should be reflected in the select box.