示例json:
{
"data": [
{
"file" : "1.txt",
"type" : "text"
},
{
"file" : "2.json",
"type" : "json"
},
{
"file" : "1.html",
"type" : "html"
}
]
}
我正在尝试创建3个具有文件和类型作为属性的节点
我正在使用以下查询在neo4j中创建节点
WITH {json} AS document
UNWIND document.data AS data
FOREACH (node in data| CREATE(m:`member`) SET m = node )
使用py2neo驱动程序时出现以下错误:
AttributeError: 'module' object has no attribute 'SyntaxError'
查询应类似于-
WITH {json} AS document
FOREACH (node in document.data| CREATE(m:`memeber`) SET m = node )