Sometimes I’ll console.log
out a value or object that I want to inspect. Then realise that actually I want to copy it. Old me would go back to the source code, and log out a JSON.stringify
, but not new me.
It’s really easy, right click on the object in the console, and "Store as Global Variable" (usually stored to temp1
). Now it’s easy to copy(temp1)
and it’ll automatically be converted into a JSON for me: