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

时间:2018-01-14 13:11:31

标签: neo4j cypher spring-data-neo4j neo4jclient cypher-3.1

我的确有像

这样的价值观
first  = [1, 2]
second = [2, 3]
third  = [1, 3]

我想在neo4j中拥有[1,2,1]

1 个答案:

答案 0 :(得分:2)

试试这个:

<div th:if="${message}" th:text="${message}" th:class="${'alert ' + alertClass}"/>

作为更通用/更优雅的解决方案,您还可以使用list comprehension

WITH [1,2] AS first, [2,3] AS second, [1,3] AS third
RETURN [first[0]] + [second[0]] + [third[0]]