Is it possible in a AngularJS ng-model directive to set the key of an object and the value in the other. For example:
{
1234: "blue"
}
and then my template looks like:
<select ng-model="obj[?]">
<option value="1234">Panda</option>
<option value="1235">Moose</option>
</select>
<select ng-model="obj[?]">
<option value="blue">Blue</option>
<option value="red">Red</option>
</select>
essentially I want to set the key as the first select and the value from the second select of that key. I know its possible with some basic obj manipulation but wondering if there was a better way through angular magic.