DEV Community

Hasan TEZCAN
Hasan TEZCAN

Posted on

Pretty Print JSON

  • For Pretty Print JSON
JSON.stringify(JSON.parse(jsonStr), null, 2);
Enter fullscreen mode Exit fullscreen mode
  • For Minify JSON
JSON.stringify(JSON.parse(jsonStr));
Enter fullscreen mode Exit fullscreen mode

Image description

Source: https://stackoverflow.com/a/65154264/10694425

Top comments (0)