Package Usage: go: github.com/jeremywohl/flatten
Flatten makes flat, one-dimensional maps from arbitrarily nested ones.
It turns map keys into compound
names, in four default styles: dotted (`a.b.1.c`), path-like (`a/b/1/c`), Rails (`a[b][1][c]`),
or with underscores (`a_b_1_c`). Alternatively, you can pass a custom style.
It takes input as either JSON strings or
Go structures. It knows how to traverse these JSON types: objects/maps, arrays and scalars.
You can flatten JSON strings.
Or Go maps directly.
Let's try a custom style, with the first example above.
1 version
Latest release: plus de 5 ans ago
283 dependent packages
View more package details: https://packages.ecosystem.code.gouv.fr/registries/proxy.golang.org/packages/github.com/jeremywohl/flatten