Suman
Suman

Reputation: 53

how to remove white spaces present in string array of neo4j

I want to remove white spaces present inside the array values

(I have scor=["1 "," 1"]). Here, first value has white space on right and second value has white space on left. How to remove those white spaces in neo4j?

Upvotes: 0

Views: 799

Answers (1)

stdob--
stdob--

Reputation: 29157

The cyper has a rich set of functions for working with strings.

In your case, you need the trim function:

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

Upvotes: 1

Related Questions