0
$scope.searchPo = function (id) {
var match = $filter('filter')($scope.array, {po: id});
return match;
});
$scope.array =
[[{"po":1},{"po":2},{"po":3}],
[{"po":11},{"po":12},{"po":13}],
[{"po":21},{"po":22},{"po":23}]]
我想要的結果[{ 「PO」:1},{ 「PO」:11},{ 「PO」:12},{ 「PO」:13} ,{「po」:21}] 當我調用$ scope.searchPo(1);
三江源非常
您需要自定義過濾器對於這一點,或者你可能只是沒有爲此使用過濾器在所有 - 純JS或lodash或什麼的。 –
你想要搜索$ scope.pos或$ scope.array嗎? –
@DanielWarke $ scope.array – hksfho