Last updated:
0 purchases
flatten unflatten
flatten_unflatten is a zero-dependency flatten and unflatten implementations for maps and lists
Usage #
import 'package:flatten_unflatten/flatten_unflatten.dart';
void main() {
final flattener = new Flatten();
var flattened = flattener.flat({
'a': {
'b': {
'c': ['hello', 'world']
}
}
});
print(flattened); // prints {a.b.c[0]: hello, a.b.c[1]: world}
var unflattened = flattener.unflat({
'a.b.c[0]': 'hello', 'a.b.c[1]': 'world',
});
print(unflattened); // prints {a: {b: {c: [hello, world]}}}
}
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.