Linked to the tittle How to print JSON data in console.log?, possibly useful notes not too far from the subject, and a tiny useful tool:
Whenever we have to work on a JSON file, via the console, we can display the url, or drop, a JSON file in a tab.
In Firefox, we have a nice JSONview, but still, we can't use the object from the console, at least directly. To access the JSON object, we have to dive a little:
JSON.parse(window.JSONView.json.data)
In Chromium, simply, a JSON is displayed as text.
JSON.parse(document.body.textContent)
From there, here is a simple Bookmarklet for both browsers.
javascript:void (async()=>{let e=window.JSONView?JSON.parse(window.JSONView.json.data):JSON.parse(document.body.textContent);console.log(e)})();
![enter image description here]()
Tldr: In a browser tab, drop a JSON file. After clicking this bookmarklet, the JSON object get displayed in the console, and from there we can use it as global variable, in the best place to do so: the browser console!