Prism · Strings

$toString

Any value as a string: a number as its digits, null as "null", an object or array as its JSON text.

The source
{ count: 42, nothing: null, point: { x: 1, y: 2 } }
The config
{
  count: { $toString: { $ref: '$.count' } },
  nothing: { $toString: { $ref: '$.nothing' } },
  point: { $toString: { $ref: '$.point' } },
}
What comes out
{ count: '42', nothing: 'null', point: '{"x":1,"y":2}' }
Output matches the expected value

Runs in this page on the installed package. The input and the expected output are defined by the example.