如何删除neo4j的字符串数组中的空格

how to remove white spaces present in string array of neo4j

I want to remove white spaces present inside the array values

(我有 scor=["1 ","1"])。在这里,第一个值在右边有白色 space,第二个值在左边有白色 space。如何在 neo4j 中删除那些白色的 spaces?

cyper 具有丰富的 working with strings 功能。

在您的情况下,您需要 trim 函数:

UNWIND ["1", "2 ", " 3", " 4 "] as e
RETURN trim(e)