var mappingFilter = {
'ID': {
create: function(data) {
return ko.utils.unwrapObservable(data.data);
}
}
}
var info = {
Name: "JohnH",
ID: "1"
};
var viewModel = ko.mapping.fromJS(info, mappingFilter);
var isFunc = typeof viewModel.ID == "function";
if (isFunc == false) $("#result").append("ID property is not a function");
else $("#result").append("ID property is a function");
ko.applyBindings(viewModel);
<div id="result"></div>
</br>
<p><font size="3"><b>Source for this<a target="_blank"href="http://jqfaq.com/how-to-prevent-ko-from-wrapping-certain-properties-in-the-data-source-for-notification/"</a> JQFaq Question</b></font></p><iframe id="iframe1" src="http://jqfaq.com/AdPage.html" style="width:100%;border:none;" />
External resources loaded into this fiddle: