I'm curious, I currently have an NSDictionary
where some values are set to an NSNull
object thanks to the help of json-framework.
The aim is to strip all NSNull
values and replace it with an empty string.
I'm sure someone has done this somewhere? No doubt it is probably a four liner and is simple, I am just far too burnt out to figure this out on my own.
Thanks!
another variation:
The result is the same as, and it appears pretty much identical to Jacob's, but the speed and memory requirements are one half to one third (ARC or MRC) in the tests I made. Of course, you could also use it as a category method as well.
Really simple:
Usage: