Skip to content

flatten_map/1 does not flatten lists #5

@vrcca

Description

@vrcca

Given the following structure:

%{items: [%{id: 1}, %{id: 2}], another: %{key: :value}}

I would expect the following result:

%{another__key: :value, items__0__id: 1, items__1__id: 2}

But we actually get:

%{another__key: :value, items: [%{id: 1}, %{id: 2}]}

I wonder if we should have a flatten_list/1 and flatten_data/1 which would combine flatten_list + flatten_map.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is neededquestionFurther information is requestedtechnicalA technical issue that requires understanding of the code, infrastructure or dependencies

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions