array litterals
This commit is contained in:
parent
21a01cc9ef
commit
8322a5ab50
@ -80,8 +80,11 @@ public extension Dictionary {
|
|||||||
return arrayForChainOfKeysOrIndexes([key])
|
return arrayForChainOfKeysOrIndexes([key])
|
||||||
}
|
}
|
||||||
|
|
||||||
func optionalArrayForKey(_ key : String) -> [Any]? {
|
func optionalArrayForKey(_ key : String) -> [Any]? {
|
||||||
return optionalArrayForChainOfKeysOrIndexes([key])
|
guard let key = key as? Key else {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return self[key] as? [Any]
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Return a Bool after looking up the specified key. This will return false if the key does not exist
|
/// Return a Bool after looking up the specified key. This will return false if the key does not exist
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user