react json object pretty

Solutions on MaxInterview for react json object pretty by the best coders in the world

showing results for - "react json object pretty"
Alejandra
26 Jul 2020
1var jsonObject = JSON.parse( jsonString ) // parse to object if necessary
2
3<div>
4  <pre> // defines preformatted text
5  	{ JSON.stringify( jsonObject, null, 2 ) } // spacing level = 2
6  </pre>
7</div>