I am unable to create a variable on this request so I can later convert the variable to JSON using converttojson
{
"update": {
"comment": [
{
"add": {
"body": "Comment added when resolving issue"
}
}
]
},
"transition": {
"id": "21"
}
}
Tried the below
$jsonRequest = @{
update= @{
comment =@{
add =@{
body = "$Description"
}
}
}
transition =@{
id = $TransactionID
}
}
But get an output as below
{
"transition": {
"id": 1
},
"update": {
"comment": {
"add": "System.Collections.Hashtable"
}
}
}