Dictionary
struct Dictionary<Key : Hashable, Value> : Collection, ExpressibleByDictionaryLiteral
-
Checks for the existence of a key
Parameter
Parameter key: the key you are looking for
Returns
Bool
Declaration
Swift
public func has(key: Key) -> Bool
Parameters
key
the key you are looking for
Return Value
Bool
-
Converts the dictionary into a string
Format:
"key":"value","key2":"value2"
Returns
aString
representation of theDictionary
Declaration
Swift
public func toString() -> String
Return Value
a
String
representation of theDictionary
-
Converts the
Dictionary
into a JSON formatted stringReturns
aString
representation of the JSONifiedDictionary
Declaration
Swift
public func toJSONString() -> String?
Return Value
a
String
representation of the JSONifiedDictionary
-
Converts each value into a
String
and returns anArray<String>
Returns
anArray<String>
of theDictionary
valuesDeclaration
Swift
public func toStringArray() -> Array<String>
Return Value
an
Array<String>
of theDictionary
values