About this Snippet
This is a snippet with two different tools baked in. You can pick which one works for you and delete the Branch and the other tool you don't need. Tool 01 - Flatten a Single Object This snippet ingests a nested object and flattens it by concatenating the keys of the nested object together. E.g. Turn this object:
{
person: {
name: "Sarah"
}
}
into this flat object:
{
person.name: "Sarah"
}
Tool 02 - Flatten an ARRAY of Objects This is a script snippet that can take an ARRAY of nested objects and flatten them by concatenating the keys of the nested object together. This is the same effect as the first tool, but you can pass it a list/array of objects and it will flatten ALL of them.
See it in action
