toJsonApi () {
    this._guardAgainstInvalidSchema()

    const resource = cloneDeep(this.resource)

    this.localAttributes
      .map(key => `data.${key}`)
      .forEach(path => unset(resource, path))

    return resource
  }
/**
   * Get the JSON:API representation of the model
   * @returns {object}
   */
Get the JSON:API representation of the model
@returns {object}
Get the JSON : API representation of the model @returns { object }
toJsonApi () {
    this._guardAgainstInvalidSchema()
    const resource = cloneDeep(this.resource)
    this.localAttributes
      .map(key => `data.${key}`)
      .forEach(path => unset(resource, path))
    return resource
  }
toJsonApi ( ) { this . _guardAgainstInvalidSchema ( ) const resource = cloneDeep ( this . resource ) this . localAttributes . map ( key => ` ${ key } ` ) . forEach ( path => unset ( resource , path ) ) return resource }
Get the JSON:API representation of the model
 @returns {object}
Get the JSON : API representation of the model @returns { object }