I have multiple input checkbox
s created from a model
with angular using ng-repeat
, when I select some of them I get this:
var accounts = [{'AA764':true}, {'AA324': true}, {'AA234': false}, {'AA553': true}, {'AA7365': false}];
But I need following structure to manipulate in controller that calls and REST API:
var accounts = ['AA764', 'AA324', 'AA553'];
Just those checkboxe
s that are selected, I have tried with the javascript foreach
function but I cannot make it work. Is there any library for angular or maybe with bower that can help me?
Thanks.