flatten_unflatten

Last updated:

0 purchases

flatten_unflatten Image
flatten_unflatten Images
Add to Cart

Description:

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

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.