Remove null values in an array Objective C || Remove null values in NSMutableArray SWIFT
Solution:
If you had a problem with null value in array you can easily remove the null value and change the unstable array stable array.
In Objective-C:
[Myarray removeObjectIdenticalTo:[NSNull null]];
In Swift:
Myarray = Myarray .filter({ ($0) as AnyObject !== (NSNull()) as AnyObject })
If you had a problem with null value in array you can easily remove the null value and change the unstable array stable array.
In Objective-C:
[Myarray removeObjectIdenticalTo:[NSNull null]];
In Swift:
Myarray = Myarray .filter({ ($0) as AnyObject !== (NSNull()) as AnyObject })
Comments
Post a Comment