JSFiddle - React, Tailwind, and code Playground
HTML
<div ng-app="TestApp" ng-controller="TestController">
<p>Selecting "20oz Soft Drink Cup" from the "Item" select should remove "Location 2" from the "Location" select</p>
Item
<select
class="form-control"
ng-model="item"
ng-options="i.name for i in itemArr">
</select><br />
Location
<select
class="form-control"
ng-model="location_from"
ng-options="l.name for l in location_fromArr | filter:{ id : item.locations[0].location_id }">
</select>
</div>
JavaScript
var app = angular.module("TestApp", []);
app.controller("TestController", function($scope) {
$scope.itemArr =
[{
"id": "9f582e58-45dd-4341-97a6-82fe637d769e",
"name": "20oz Soft Drink Cup",
"locations": [
{ "inventory_id": "9d5aa667-4a64-4317-a890-9b9291799b11", "location_id": "c0d916d7-caea-42f9-a87f-a3a1f318f35e" }
],
}];
$scope.location_fromArr =
[
{ "id": "c0d916d7-caea-42f9-a87f-a3a1f318f35e", "name": "Location 1" },
{ "id": "d8a299a3-7f4b-4d32-884f-efe25af3b4d2", "name": "Location 2" }
];
});