Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/neo4j/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何获取多个数组的第一个值并将其存储在neo4j中的另一个数组中?_Neo4j_Cypher_Spring Data Neo4j_Neo4jclient_Cypher 3.1 - Fatal编程技术网

如何获取多个数组的第一个值并将其存储在neo4j中的另一个数组中?

如何获取多个数组的第一个值并将其存储在neo4j中的另一个数组中?,neo4j,cypher,spring-data-neo4j,neo4jclient,cypher-3.1,Neo4j,Cypher,Spring Data Neo4j,Neo4jclient,Cypher 3.1,我有这样的价值观 first = [1, 2] second = [2, 3] third = [1, 3] 我想在neo4j中使用[1,2,1]?试试这个: WITH [1,2] AS first, [2,3] AS second, [1,3] AS third RETURN [first[0]] + [second[0]] + [third[0]] 作为更通用/更优雅的解决方案,您还可以使用: WITH [1,2] AS first, [2,3] AS second, [1,3] A

我有这样的价值观

first  = [1, 2]
second = [2, 3]
third  = [1, 3]
我想在neo4j中使用
[1,2,1]

试试这个:

WITH [1,2] AS first, [2,3] AS second, [1,3] AS third
RETURN [first[0]] + [second[0]] + [third[0]]
作为更通用/更优雅的解决方案,您还可以使用:

WITH [1,2] AS first, [2,3] AS second, [1,3] AS third
RETURN [list IN [first, second, third] | list[0]]