How to check if all keys in json equal true
javascript, jquery
Solution
Or a bit more functionally:
Object.keys(success).every(function(key) {
return success[key];
});
Problem
how can I check if all the keys in a json object equal to true? my object looks like this ``` success = { "first_name": false, "middle_name": false, "last_name": false, "d_o_b": false, "sex": false, "email": false, "re_email": false, "password": false, "re_password": false }; ``` I proccess the object and every thing that turns out ok gets changed to true, now at the end I want to check if all are true, how can I do this? thank's :-)