JSON.RemoveEmptyObjects ( obj )
Recursively remove empty objects like "{}" from a json object
Be the first to rate this function Log in to vote
|
Josh Willing - Show more from this author
Willing Apps |
"Admin":{
"a":123,
"b": {}
},
"User":{
"a":{
"b":{},
"c":{}
}
}
}
"Admin":{"a":123}
}
// "User" completely removed because all nested objects
// Admin.b removed because empty obj
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
If removing an empty object in a nested key causes the parent object to become empty, the parent object will be removed too.
Comments
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.