JSONDeleteEmptyElements ( json )
Removes any empty values from a JSON object or array of objects
Be the first to rate this function Log in to vote
Jake Scheele - Show more from this author
Edimate http://www.edimate.com |
;[ " empty" ; "" ; 1 ]
;[ "full" ; "full" ; 1 ]
;[ "object.empty" ; "" ; 1 ]
;[ "object.full" ; "full" ; 1 ]
;[ "arrayofObjects[0]empty" ; "" ; 1 ]
;[ "arrayofObjects[0]full" ; "full" ; 1 ]
;[ "arrayofObjects[1]empty2" ; "" ; 1 ]
;[ "arrayofObjects[1]full2" ; "full" ; 1 ]
;[ "arrayofObjects[1]tester" ; "" ; 1 ]
;[ "array[0]" ; "1" ; 1 ]
;[ "array[1]" ; "2" ; 1 ]
;[ "array[2]" ; "" ; 1 ]
;[ "array[3]" ; "4" ; 1 ]
) ) )
"array" : [ 1, 2, "", 4 ],
"arrayofObjects" :
[
{
"full" : "full"
},
{
"full2" : "full"
}
],
"full" : "full",
"object" :
{
"full" : "full"
}
}
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
Removes any empty elements from a JSON object or array of objects. Recursively removes any empty nested values.
Comments
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.