0
Basically, I want to search for a string and return any full or partial matches in a CSV format.
Let's say I have an object $Shoes
that looks like:
"Brand","Style","Color","Price"
"Reebok","Basketball","Red/Black","$50"
"Vans","Slip-On","White/Black","$60"
"Vans","Old Skool","Red/White","$60"
"Nike","Sneakers","Red","$50"
"Adidas","Sneakers","Blue","$55"
To make it more readable, formatting as a table would look like:
Brand Style Color Price
----- ----- ----- -----
Reebok Basketball Red/Black $50
Vans Slip-On White/Black $60
Vans Old Skool Red/White $60
Nike Sneakers Red $50
Adidas Sneakers Blue $55
Typing $Shoes -like '*Red*'
returns:
@{Brand=Reebok; Style=Basketball; Color=Red/Black; Price=$50}
@{Brand=Vans; Style=Old Skool; Color=Red/White; Price=$60}
@{Brand=Nike; Style=Sneakers; Color=Red; Price=$50}
But the output I'm looking for is:
Brand Style Color Price
----- ----- ----- -----
Reebok Basketball Red/Black $50
Vans Old Skool Red/White $60
Nike Sneakers Red $50
What am I doing wrong here?