Created
August 2, 2019 15:50
-
-
Save esquinas/acac3e92b189e5ec7f512294eb3ffeef to your computer and use it in GitHub Desktop.
Used to prettify (make readable) JSON data returned by the WP JSON REST API, for example. Usage: copy & paste into your Chrome's console (in Firefox is built-in).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.querySelector('pre').textContent = JSON.stringify(JSON.parse(document.querySelector('pre').textContent), null, 4); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment