Why redis use lodash set to convert key to structure?

Hi,

I just set a redis string named IP_127.0.0.1 but as Redis node is using lodash set it convert it to a weird data structure when I try to get it using KEYS.

[
    {
        "IP_127": [
            [
                [
                    null,
                    null,
                    "test"
                ]
            ]
        ]
    }
]

I just wonder which use case is covered by this behaviour.

thx

Welcome to the community @agix!

Totally agree that should not work like that and I would consider a bug in this case. Will fix it and release with next version.

It’s weird as the naive way is to just set the key of the object without lodash. It means the people who did this had a reason…

I found a workaround setting my redis key like this : ["IP_127.0.0.1"] it’s a bit crappy but it works.

I did it around 10 months ago. And I probably just did it because I did not think about that people would use dots in a key name as I personally would never do that (have however no idea about redis and if that is something normal). For “Get” I did use it purposely to allow setting it on deeper levels.

Is fixed and will be released with the next version:

Got released with [email protected]

It sadly contains a few breaking changes so please make sure to check here before upgrading: