I have been having trouble parsing an output from a rest api. it is a Multiline string
Policy Name: Default_US_MultiSite Id: abc1234abc123 Buckets: support_us1_multisite,ch1ny2
Policy Name: Default_CH Id: 123456789acdef Buckets: question,answer,ch2,ch1,drive.me.closer
Policy Name: Default_NY Id: qrstuvwxyz9876 Buckets: demo,bucket1,test1,test,ny0,nyhello,goodbye,new.shoes,pizza,cutecats,theinternetisfor,Halloween,For-the-emperor
Now I do have an idea on how to split it by line, kinda and I try to use the following code
$data.Split("`n")
but I still cant figure out how to go about next and parse this
it doesnt recognize Policy Name, buckets, id as separate objects
do I convert it into or assign it as json or xml or something using more than just Convertto-xml or [xml] prefixing $data?
Thanks