Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[FEAT] Support Set with Slice (Array) Index Using Square Brackets? #96

@KiddoV

Description

@KiddoV

It would be nice to support slice index in .Set()
Example:

config.Set("parent.child[0]", "Test1")
config.Set("parent.child[1]", "Test2")

Currently, the result will be like:

{
    "parent": {
        "child[0]": "Test1",
        "child[1]": "Test1"
    }
}

==> Expecting result would look like:

{
    "parent": {
        "child": [
          "Test1",
          "Test2"
        ]
    }
}

Thanks,

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions