I have the following JS object:
function AdvancedFilters() {
var self = this;
self.AdvancedColId = ko.observable();
self.AdvancedComapanyName = ko.observable();
self.AdvancedClientCountry = ko.observable();
self.AdvancedClientCity = ko.observable();
self.AdvancedDatabaseLocation = ko.observable();
self.AdvancedUserName = ko.observable();
self.AdvancedEmail = ko.observable();
self.AdvancedPhoneNo = ko.observable();
self.AdvancedAccessFrom = ko.observable();
self.AdvancedAccessTo = ko.observable();
self.AdvancedCreatedOn = ko.observable();
self.AdvancedCandidates = ko.observable();
self.AdvancedErrorsReported = ko.observable();
self.AdvancedActive = ko.observable();
self.AdvancedRequestes = ko.observable();
}
I have to loop through all the properties present in the AdvancedFilters
object and do something which applies to all the properties instead of accessing each property separately. I have to something like this:
for (var property in AdvancedFilters) {
// do something with property
}
I tried the above syntax but it is not working.