map操作:
var map = {};
map["a"] = 1;
map["b"] = 2;
console.log(Object.keys(map)); //[ 'a', 'b' ]
console.log(map); //{ a: 1, b: 2 }
delete map["a"];
遍历map
for(var key in $scope.idsMap){
$scope.kpIds.push($scope.idsMap[key]);
}
map操作:
var map = {};
map["a"] = 1;
map["b"] = 2;
console.log(Object.keys(map)); //[ 'a', 'b' ]
console.log(map); //{ a: 1, b: 2 }
delete map["a"];
遍历map
for(var key in $scope.idsMap){
$scope.kpIds.push($scope.idsMap[key]);
}