json prettify code example
Example 1: js json_encode pretty
var str = JSON.stringify(obj, null, 2); // spacing level = 2
Example 2: js json stringfy beutify
JSON.stringify(obj, undefined, 2);
Example 3: json beautify
fetch('https://fakestoreapi.com/products/6',{
method:"DELETE"
})
.then(res=>res.json())
.then(json=>console.log(json))
Example 4: json beautify
fetch('https://fakestoreapi.com/products/1')
.then(res=>res.json())
.then(json=>console.log(json))