JSFiddle - React, Tailwind, and code Playground

JavaScript

Object.prototype.toJson = function() {return JSON.stringify(this)}

var a = {b:22};

console.log(a.toJson());