I wanted to have a JSON like this in PS.
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "This is Random Text"
}
}
]
}
For which I write-up following code in my PS script.
$Json=@{
"blocks"=@(
@{
"type"="section"
"text"=@{
"type"="mrkdwn"
"text"="This is Random Text"
}
}
)
}
But when I convert it to JSON, I get following output.
{
"blocks": [
{
"text": "System.Collections.Hashtable",
"type": "section"
}
]
}
I am pretty much novice with PS, any help would be highly appreciated.