Constructors
Map()
Map(String)
" like this: “key=value
key=value
key=value,…”
Methods
insert(String, String)
Adds a new key-value pair to the map.This function will reset the internal iterator in the map.
exists(String)
Checks if the map contains the given key.size()
Counts the elements in the map and returns that number.An empty map has size == 0.
get(String)
Returns the value for the given key.getKey()
Returns the key pointed to by the map iterator.getVal()
Returns the value pointed to by the map iterator.getWithFallback(String, String)
Returns the fallback value if key does not exist.increaseValueForKey(String, Integer)
When working with numeric strings, you can increment values stored in the map. Provide the key to look up the element and the value to add to the currently stored value.You can pass the increment as either Integer or Float.
increaseValueForKey(String, Float)
When working with numeric strings, you can increment values stored in the map. Provide the key to look up the element and the value to add to the currently stored value.You can pass the increment as either Integer or Float.
remove(String)
Removes the element with the given key.clear()
Removes all elements from the map.eof()
Returns true if the map iterator has moved past the end of the map, otherwise false.That eof() returns true is not the same as the map is empty. It can be, but it doesn’t have to be. Use size() to check if the map is truly empty.
first()
Rewinds the internal iterator to the 1st element. Returns false if the map is empty.next()
Moves the map iterator to next position. Returns false if eof().toJson()
Converts the Map to JSON.fromJson(String)
Converts a JSON string to a map. Format:{"key": "value", "foo": "bar"}