code: function() {
        var privateCollection = this.privateCollection;
        if (!this.parentBehavior.returnSingleResult) {
          return privateCollection.toJSON();
        }
  
        if (privateCollection.length === 0) {
          return undefined;
        } else if (privateCollection.length === 1) {
          var singleResultModel = privateCollection.at(0);
          return singleResultModel.toJSON();
        } else {
          throw new Error('Multiple results found, but single result expected: ' + JSON.stringify(privateCollection.toJSON()));
        }
      }
docs: Get the full data object contents.  Either an array if returnSingleResult is false or a single object if it is true.
  @method toJSON
  @return {Object|Object[]} containing the full contents of either the collection or model.