The toJSON() method of the DOMMatrixReadOnly interface creates and returns a JSON object.
toJSON()
MDN Reference