I am successfully using jq.exe installed on my windows with choco install jq:
$ echo '{"class": [{"name": "oren", "age": 6},{"name": "moish", "age": 200}]}' | jq.exe
{
"class": [
{
"name": "oren",
"age": 6
},
{
"name": "moish",
"age": 200
}
]
}
Can I achieve the same recursively indented format with power shell's native ConvertFrom-Json ?
$ echo '{"class": [{"name": "oren", "age": 6},{"name": "moish", "age": 200}]}' | ConvertFrom-Json
class
-----
{@{name=oren; age=6}, @{name=moish; age=200}} # <--- useless for real json files
I couldn't find anything in the docs