apoc.map.renameKey
函数 Apoc 扩展
重命名 MAP 中的给定键。
使用示例
apoc.map.renameKey (默认配置)
WITH {
old_key: [1, "test", {old_key: "some_value"}],
otherKey: [1, ["test", {old_key: "some_value"}]],
name: {old_key: "some_value"},
other: "key"
} AS map
RETURN apoc.map.renameKey(map, "old_key", "new_key") as value
| 值 |
|---|
|
apoc.map.renameKey (配置
recursive: false)WITH {
old_key: [1, "test", {old_key: "some_value"}],
otherKey: [1, ["test", {old_key: "some_value"}]],
name: {old_key: "some_value"},
other: "key"
} AS map
RETURN apoc.map.renameKey(map, "old_key", "new_key", {recursive: false}) as value
| 值 |
|---|
|