apoc.map.flatten
Function
apoc.map.flatten(map Map<String, Any>, delimiter String)
- flattens nested items in the given map.
This function is the reverse of the apoc.map.unflatten
function.
Usage Examples
The following flattens a nested map using the default .
delimiter:
RETURN apoc.map.flatten({
person: {
name: "Cristiano Ronaldo",
club: {
name: "Juventus",
founded: 1897
}
}
}) AS output;
Output |
---|
|
The following flattens a nested map using the /
delimiter:
RETURN apoc.map.flatten({
person: {
name: "Cristiano Ronaldo",
club: {
name: "Juventus",
founded: 1897
}
}
}, "/") AS output;
Output |
---|
|
Was this page helpful?