Given the following JSON:
{
"field1": "value1",
"field2": "",
"field3": "value3",
"field4": ""
}
How do I get two distinct JSONs, one containing the fields with value and another one containing the fields without value? Here below is how the final result should look like:
{
"field1": "value1",
"field3": "value3"
}
{
"field2": "",
"field4": ""
}