graphfoundation/ongdb-apoc

Map Unflatten Function

Closed this issue · 0 comments

Feature description (Mandatory)

Add a function to unflatten a Map from dot-notation. The inverse of operation of apoc.map.flatten.

Considered alternatives

I could use non-flattened maps for my use case, but that would require some heavily nested apoc.map.merge and apoc.map.setKey calls.

How this feature can improve the project?

Users will be able to go from a flattened map

{
    "key": "value",
    "nested.key": "anotherValue",
    "nested.anotherKey": "yetAnotherValue"
}

to a regular map

{
    "key": "value",
    "nested": {
        "key": "anotherValue",
        "anotherKey": "yetAnotherValue"
     }
}