I have a JSON obj, after some operations (like delete some pieces), I print it and everything looks good except that I have some null values. How do I remove th
null
I use the code here
Remove empty elements from an array in Javascript
then you could call it like
JSON.stringify(obj.clean(null), null, 2)
You would need to modify the code to work with objects too (or use the code as is inside the objects)