traverse static method
Implementation
static ({bool exists, dynamic value}) traverse(Map map, String key) {
var subPaths = key.split(".");
dynamic value = map;
for (var path in subPaths) {
if (value is! Map) return (exists: false, value: null);
if (!value.containsKey(path)) return (exists: false, value: null);
value = value[path];
}
return (exists: true, value: value);
}