i have a condition in my function . i want to set a value of a variable true or false on the basis of another variable whether it is empty of not in knockout js?
The way you have it written you would need
self.editData = function (data) { self.id(data.id); self.nscto(data.nscto); if (self.nscto() != null && self.nscto() == ""){ self.view(true); } }