i read a csv file into a variable using Import-CSV. Now when I try to print a list of all values of a certain property, I can see through GetType() that these are not Integer values but rather "PSCustomObjects". How can i convert all of these values into integer? I need to do manipulations like Sort-Object etc.
I tried doing some typecasts i found in other threads like so:
[int]($MyArray | select -ExpandProperty Level)
but they arent working because I get an error that its not possible to convert from pscustomobject to int or whatever. I don't even know what this object is supposed to be, I mean i can see the list contains numbers, so why arent they either string or integer...Sometimes powershell is driving me crazy.
Thanks for the help