get<T> method
Gets the specified path's value.
USAGE:
DotMap.get(map, '1.2.3');
Implementation
T? get<T>(map, String path, {T Function(dynamic)? converter}) {
List<String> keys = path.split('.');
if (map[keys[0]] == null) {
return null;
}
if (keys.length == 1) {
return converter != null ? converter(map[keys[0]]) : map[keys[0]] as T;
}
return get(map[keys.removeAt(0)], keys.join('.'));
}