I have an array that I created this way
[System.Collections.ArrayList]$Fruits = "A", "B"
Now I want to have a Json document that looks likd this
{
'fruits':['A', 'B']
}
I have no idea how to create the key as
$fruits | ConvertTo-Json
simply creates this
[
"A",
"B"
]