You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If one has an object that they want to render as a string in JSONata, it is possible to produce a JSON representation of that object with the $string() function. However, this function produces a JSON output with minimal whitespaces which can be good for some situations but not good for others. It would be nice if there was a way to render "prettified" JSON (one line per field, indenting based on the field depth) to the output. Perhaps a second boolean argument to $string() called prettify might do the trick.
The text was updated successfully, but these errors were encountered:
Simply adding a second argument to $string() isn't as straight forward as I expected since if one uses $string() in a hof, then the hof supplies an int as a second argument.
If one has an object that they want to render as a string in JSONata, it is possible to produce a JSON representation of that object with the
$string()
function. However, this function produces a JSON output with minimal whitespaces which can be good for some situations but not good for others. It would be nice if there was a way to render "prettified" JSON (one line per field, indenting based on the field depth) to the output. Perhaps a second boolean argument to$string()
calledprettify
might do the trick.The text was updated successfully, but these errors were encountered: