Converts a Map to a list of key-value pairs
List<MapEntry<K, V>> toPairs<K extends String, V>(Map<K, V> map) { return map.entries.toList(); }