How to escape " in windows power shell

Viewed 14

It seems that back-slash doesn't work:

> echo "[{\"name\": \"oren\"}]" > input.json
> type .\input.json
[{\
name\: \oren\}]
1 Answers

According to this link:

The PowerShell escape character is the backtick "`" character

And indeed:

> echo "[{`"name`": `"oren`"}]" > input.json
> type .\input.json
[{"name": "oren"}]

Strangely enough, this info is not (easily?) found in the official docs

Related