lib/base/json.js
function(allowedAttributes) {
    var tmp = []
    this.forEach(function(record) {
      tmp.push(record.toJson(allowedAttributes))
    })
    return tmp
  }
function(allowedAttributes) {
    var tmp = []
    this.forEach(function(record) {
      tmp.push(record.toJson(allowedAttributes))
    })
    return tmp
  }
function ( allowedAttributes ) { var tmp = [ ] this . forEach ( function ( record ) { tmp . push ( record . toJson ( allowedAttributes ) ) } ) return tmp }
Returns an array of objects which represent the records in plain json

@class Collection
@method toJson
@param {array} allowedAttributes - Optional: Only export the given attributes and/or relations

@return {array}
Returns an array of objects which represent the records in plain json