compactJSON
Compact a JSON string by removing all unnecessary whitespace.
json(required): JSON string to compactoptions(optional): formatting optionsindent(optional): indentation level
bash
echo '{"data": {"name": "Alice", "age": 30}}' | utlx -e 'compactJSON(renderJson($input))'
# {"name":"Alice","age":30}utlx
// See Chapter 24 for JSON processing.
{
minified: compactJSON(renderJson($input))
}