apoc.convert.toString

Function APOC Core

apoc.convert.toString(value) | tries it’s best to convert the value to a string

Signature

apoc.convert.toString(string :: ANY?) :: (STRING?)

Input parameters

Name Type Default

string

ANY?

null

Usage Examples

Convert numeric value to string
RETURN apoc.convert.toString(1) AS output;
Table 1. Results
Output

"1"

Convert boolean value to string
RETURN apoc.convert.toString(true) AS output;
Table 2. Results
Output

"true"

Convert map to string
RETURN apoc.convert.toString({key: "value"}) AS output;
Table 3. Results
Output

"{key=value}"