Query Details

Substitute Json Characters

Query

let text = ```text```;
print
    replace_strings(
        replace_string(
            text
        , @"\", @"\\")
    ,   dynamic([ '"' ,  '\n']),
        dynamic([@'\"', @'\n']))

Explanation

The query is replacing certain characters in a given text. It replaces backslashes with double backslashes and double quotes and newlines with their respective escape sequences.