Pretty Print Json using Javascript

How to Pretty-print or format JSON using Javascript code?