title: Knockout.Mapping create mapping hook for simple JSON array
body: <p>When using the knockout.mapping plugin for knockout.js I can customize the way items in a collection are created like this:-</p>
  
  <pre><code>var ItemModel = function (data) {
      ko.mapping.fromJS(data, {}, this);
      this.FooProperty = ...;
  };
  
  var mapping = {
      'Items': {
          create: function (options) {
              return new ItemModel(options.data);
          }
      }
  }
  </code></pre>
  
  <p>this.Items = ko.mapping.fromJS(data, mapping);</p>
  
  <p>This assumes that the data contains a property "Items" which contains a collection. But what if data is just a JSON array? How can I hook my creation function into items in the top level root of the incoming data?</p>
  
  <p>From looking at the docs, it seems that keys in the mapping object can be property names of the data to act on, or they can be one of include, ignore, copy. From this, I can't see how achieve what I want, unless I wrap the incoming JSON into an object with a propery, map it, and then unwrap the result.</p>