KO Mapping issue with child objects
问题 I get the following data from the server: var data = [{ id: 0, child: { prop1 : 'a', prop2 : 'b' } } //Child object has data ,{ id: 0, child: null } ]; // Child object is null I'm having some issues after I map the data using the knockout mapping plugin. The issue is that the inner child object is not of the same type. After executing this: ko.mapping.fromJS(data, viewModel.data); I get that the first object has a child property of type Object with the data. However the second object has a