NSDictionary(SFAdditions) Category Reference
Declared in | NSDictionary+SFAdditions.h |
---|
– sfsdk_objectAtPath:
Get object from NSDictionary with “/” separated path.
- (nullable id)sfsdk_objectAtPath:(nullable NSString *)path
Parameters
path |
Path for the object to retrieve. Use “/” to separate between levels. For example, root/child/valueKey will retrieve value from the root NSDictionary object to its child dictionary’s value with key “valueKey” |
---|
Discussion
This method is similar to the built-in valueForKeyPath function except it handles special value like NSNULL and
Declared In
NSDictionary+SFAdditions.h
– sfsdk_nonNullObjectForKey:
Returns an object whose ID is key, or nil.
- (nullable id)sfsdk_nonNullObjectForKey:(nullable id)key
Parameters
key |
The ID of an object, or a null value |
---|
Return Value
An object whose ID is key, or else nil if the key has a value of NSNull or an NSString value of “
Declared In
NSDictionary+SFAdditions.h
– sfsdk_jsonString
Returns the dictionary’s contents reformatted as a JSON string.
- (nullable NSString *)sfsdk_jsonString
Declared In
NSDictionary+SFAdditions.h