apoc.map.unflatten
Function
apoc.map.unflatten(map Map<String, Any>, delimiter String)
- unflattens items in the given map to nested items.
This function is the reverse of the 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 |
---|
|
Was this page helpful?