The other day I was debugging a page in Chrome: I was staring at a really complex object that had just been logged to the console, looking for a field with a specific name. If only they'd stringified it before logging, I could then copy it into an editor.
So I just lazily right-clicked the object and...
How had I missed this before?
I could now call JSON.stringify(temp1)
and the field is mine!
Of course I checked in Firefox two minutes later and found out they'd implemented not just this feature but "Copy object" too, which would reveal the JSON in a single step.
But I'll still treasure "Store as global variable" because it also allows you to manipulate said object or call functions.
Ignorance is like a very loud jackhammer, it feels great to take a step away from it.
Top comments (1)
I'm going to remember this one.