Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Find out if array contains object

$
0
0

Ok, i'm having a brainfreeze.. I'm trying to determine if the array I import contains a certain object

 

for example, after I import a csv, I want to see if there is a property named code

I'm trying something like this

 

$i = ipcsv c:\temp\codes.csv

if ($i.code -ne $null) { do this }

 

I must be missing something....  


Viewing all articles
Browse latest Browse all 6937

Trending Articles