Skip to content

Feature request or bug: keep the last element as array #4

@HapLifeMan

Description

@HapLifeMan

Hello,

Amazing library and work here!

I wanted to know if it was possible to add an option (or do it by default) to keep the last element as array?

For instance:

// For instance:

{
  world: 'Earth',
  countries: [
    'France',
    'Spain',
    'Italia',
    // ...
  ],
  people: [
    { country: 'France', number: 67000000 },
    // ...
  ],
}

// would be flattened to:

{
  'world': 'Earth',
  'countries': ['France', 'Spain', 'Italia'],
  'people[0].country': 'France',
  'people[0].number': 67000000,
}

// instead of:

{
  'world': 'Earth',
  'countries[0]': 'France',
  'countries[1]': 'Spain',
  'countries[2]': 'Italia',
  'people[0].country': 'France',
  'people[0].number': 67000000,
}

What do you think? 😊

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions