torso-bundle.js
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()));
      }
    }
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()));
      }
    }
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 ( ) ) ) ; } }
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.
Get the full data object contents . Either an array if returnSingleResult is false or a single object if it is true .