getByPathString<R> method
Implementation
R getByPathString<R>(String path, {dynamic def}) {
if (path.endsWith('/')) {
path = path.substring(0, path.length - 1);
}
if (path.startsWith('/')) {
path = path.substring(1, path.length);
}
List<dynamic> arr = <dynamic>[];
for (var element in Uri(path: path).pathSegments) {
arr.add(int.tryParse(element) ?? element);
}
return getByPath<R>(arr, def: def);
}