ToString (NoSQL query)

APPLIES TO: NoSQL

Returns a string representation of a value.

Syntax

ToString(<expr>)

Arguments

Description
expr Any expression.

Return types

Returns a string expression.

Examples

This example converts multiple scalar and object values to a string.

SELECT VALUE {
    integerToString: ToString(125),
    floatToString: ToString(0.1234),
    booleanToString: ToString(false),
    arrayToString: ToString([ 1, 2, 3 ]),
    objectToString: ToString({ "department": "Bicycles" }),
    stringToString: ToString("Hello World"),
    undefinedToString: ToString(undefined),
    notANumberToString: ToString(NaN),
    infinityToString: ToString(Infinity)
}
[
  {
    "integerToString": "125",
    "floatToString": "0.1234",
    "booleanToString": "false",
    "arrayToString": "[1,2,3]",
    "objectToString": "{\"department\":\"Bicycles\"}",
    "stringToString": "Hello World",
    "notANumberToString": "NaN",
    "infinityToString": "Infinity"
  }
]

Remarks

  • This function doesn't use the index.