apoc.map.unflatten
Function APOC Core
apoc.map.unflatten(map, delimiter:'.') yield map - unflat from items separated by delimiter string to nested items (reverse of apoc.map.flatten function)
Usage Examples
Using the following map and the default .
delimiter:
RETURN apoc.map.unflatten({
`person.name`: "Cristiano Ronaldo",
`person.club.founded`: 1897,
`person.club.name`: "Juventus"
}) AS output;
will be returned:
Output |
---|
|
Using the following map and a custom delimiter, that is /é哈
:
RETURN apoc.map.unflatten({
`person/é哈firstName`: "Cristiano",
`person/é哈lastName`: "Ronaldo",
`person/é哈club/é哈founded`: 1897,
`person/é哈club/é哈name`: "Juventus"
}, '/é哈') AS output;
will be returned:
Output |
---|
|