📌  相关文章
📜  angularjs 在数组中查找和更新对象 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:16.498000             🧑  作者: Mango

代码示例1
//$scope.customers is a list of customers
// o is a response of PUT request which will be return customer updated object
var x = $scope.customers.find(x => x._id === o.data.customer._id)
var index = $scope.customers.indexOf(x)
$scope.customers[index] = o.data.customer