I'm writing a script right now but am running into an issue. I need to be able to get a count of columns or just display and manipulate the existing column names in a hash-table. Basically I'm putting XML data into a variable, but depending on how many columns are in the hash-table (that is an unknown part until I start manipulating table) will depend on how I need to act on that data.
So in a nutshell I have a hashtable with both unknown column names and unknown count of columns. I need to find a way to either just list and work with column names or do logic based off of how many columns there are.
So if I could do something to the effect of
($Variable | % {$_.columnname}).count
That would be optimal. Hopefully this has made sense.