Two part question about similar problems. I\'ve got 2 different arrays,
array 1:
array1 = [{ name : \"users\", checked :
You can use es6 fat arrow and make one liner but still it involves iteration .
array1.map(a=>a.checked=true);
array1 = [{ name : "users", checked : true }, { name : "active users", checked : false }, { name : "completions", checked : false }] array1.map(a=>a.checked=true); console.log(array1);