edits for nest() to write flare-valid objects

key -> name
values -> children