I found how to use only 2 data parameters.
Create a ViewModel as a source data mapping, then use ko.mapping.fromJS(data, ViewModel) .
UPDATED jsFiddle
Explanation
The knockout uses the mappingProperty = "__ko_mapping__" property to identify when data has been previously matched. If it is found, it will set the second parameter as the target (in this case, ViewModel).
Excerpt from the debug version of ko.mapping.js:
var mappingProperty = "__ko_mapping__"; [...] if (arguments.length == 2) { if (arguments[1][mappingProperty]) { target = arguments[1]; } else { options = arguments[1]; } }
source share