0
我有這樣的代碼:如何添加對象到數組中的JavaScript
$scope.role.object_access_right = {contact:1,group:1,image:1,text:1,email_template:1,email:1,channel:1,campaign:1,invoice:1,user:1,account:1,tenant:1,}
我這裏有空數組,
$scope.access = [];
我怎麼能推的關鍵,空數組有結果?
$scope.access = [contact,group,text ...]
感謝和更多的問題,我想獲得價值和使用:$ scope.access = Object.values($ scope.role.object_access_right);但它不適合我? –