code: function toJSON() {
      function filter(obj) {
        return Object.keys(obj)
          .filter(function(key) {
            return typeof obj[key] !== 'function' && key[0] !== '_';
          })
          .reduce(function(clone, key) {
            clone[key] = typeof obj[key] !== 'object' ?
              obj[key] : filter(obj[key]);
            return clone;
          }, Array.isArray(obj) ? [] : {});
      }
      return JSON.stringify(filter(obj));
    }
docs: Export model to JSON string. Not exported: - properties starting with _ (Python private properties convention) - computed properties (derived from normal properties)