Using the predefined angularjs ng-options directive can be quite tricky at times. The following is a basic example of how to iterate through list of people. The value of the person that is chosen from the drop down list is store in $scope.chosenPerson and can be accessed with the same from the controller.
Example 1:
Output:
Example 2: If you just want the value to be last name instead of the whole object use this.
Output:
To access a nested array and show it as part of the dropdown the following example demonstrates how to do that,
Example 3
Output
In the above example if the countries and locations were 2 completely different objects, then a hashmap can be used to link those two objects by keys and values.