I am processing a CSV file, and in one of the columns are cells that have the a string in an array format. Here is what accessing those cells looks like:
$csv = Import-Csv $filelocation
foreach ($line in $csv)
{
Write-Host $line.ColumnName
}
Output:
[Property=[value1,value2,value3]] [Property=[value1,value2]] ...
You can see that each cell outputs a string with an array structure. I want to treat each individual string as an array with Property[0] = value1, etc.
Is there a simple way to do this? Otherwise, I assume I will need to use Reg Ex.
,,,,,"[AsymmetricKey=[]]","[AppAddress=[[AddressType=Reply,Address=urn:ietf:wg:oauth:2.0:oob]]]","[AppAuxiliaryId=[]]",,,,Here you can see a bunch of empty columns and a few of these "array like" strings.foreach($value in $line.ColumnName.AppAddress) { write-host $value.AddressType }would return "Reply" for that line.[Property=[value1,"value2a,value2b",value3]]. And then, if it contains"?[Property=[value1,"value2a,value2b","value""3"""]]?