mirror of
https://github.com/johnkerl/miller.git
synced 2026-01-23 02:14:13 +00:00
13 lines
261 B
Text
13 lines
261 B
Text
# Prototype for the DSL unflatten function
|
|
func u_unflatten(map input, str delim): var {
|
|
if (!is_map(input)) {
|
|
return input
|
|
}
|
|
|
|
map retval = {};
|
|
for (k, v in input) {
|
|
arr indices = splitax(k, delim);
|
|
retval[indices] = v
|
|
}
|
|
return retval
|
|
}
|