Hello,
I have a problem to get below approach.
Imagine that I have csv file with content as below:
Head1;Head2;Head3;
xyz;---;---;
---;zyx;---;
---;---;xzy;
123;---;---;
---;213;---;
---;---;321;I'd like to import this file to powershell (import-csv) and put whole content to PSObject that:
1. First line contains only headers - that if I put $PSObj[1] I'll get all headers
2. All three "letters lines" are joined to one PSObject item - that if I put "$PSObj[1]" I'll get all these 3 lines
3. All three "numbers lines" are joined to one PSObject item - that if I put "$PSObj[2]" I'll get all these 3 lines
I need points 2 and 3 because I need to compare imported information on subject level (Test1 or Test2) and not to compare information on each line level.
One facilitation (I hope) is that each PSObject item begines when in a row in first column is not "---" value. And end of this item is one row before a row where in first colum is different value than "---" (it is shown on above example)
Has anyone an idea how to do it?