Is there a way to exclude the parent object when the child elements are all null?
JSON Example:
This is the current generated output:
{
“name”:“John Smith”,
“address”: {
“street”: null,
“city”: null,
“state”: null,
“zip”: null
}
}
What I want is:
{
“name”:“John Smith”
}
How can I make address and all it’s elements go away when the elements are all null?