hi,
i think in your computed you throw in self which is the viewModel and not the object you've created
try to replace the json object literal with;
function MyObject(activeProductCodes,productCode){
var self = this;
self.productCode= ko.observable(productCode);
self.activeProductCodes = activeProductCodes;
self.isActiveProduct=ko.computed(function() {
return self.activeProductCodes.indexOf(self.productCode()) !== -1 ? true : false;
});
}
...
self.mySecondObject = ko.observable(new MyObject(self.activeProductCodes,object2.productCode));
best regards,
noirabys