Skip to content

Accessing variables in Object with key containing a dot #23

Closed
@tatarysh

Description

@tatarysh

I encountered an issue related to accessing variables within an object where the key contains a dot. The logical query looks like this:

{
    "var": "hello.world"
}

And the payload is:

{
    "hello": {
        "world": "i'm here!"
    },
    "hello.world": "ups!"
}

Currently, there is no access to the hello.world variable. I believe it would be beneficial to adopt the convention used in the dot-prop package, where access to such a key is possible by including a double backslash before the dot in the key. Therefore, for the mentioned query, it should look like this:

{
    "var": "hello\\.world"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions