tobase64()

Returns a binary value as a BASE64 string.

Syntax

tobase64(BLOB_EXPR)
Required Parameters
BLOB_EXPR
Expression to be evaluated as binary. The function returns null if it receives a non-binary value.

Usage

json "{}" | eval str=tobase64(binary("hello, world!"))
=> "aGVsbG8sIHdvcmxkIQ=="