Probably your only viable option is to use a custom create
function for every child collection...
But you don't need to manually create the mapping you can generate the with the using the ko.mapping.visitModel
method, something like:
var mapping = {};
ko.mapping.visitModel(data, function(item, parent) {
if (ko.mapping.getType(item) === "array")
{
mapping[parent] = {
create: function(op) { return ko.mapping.fromJS(op.data); }
}
}
});
var mappedData = ko.mapping.fromJS(data, mapping);
Demo JSFiddle.