Last active
March 23, 2018 09:13
-
-
Save shaneis/6dbafdb41bbf69b33de4806c0310b149 to your computer and use it in GitHub Desktop.
Showing what join can do
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
. .\Desktop\In_Progress\PowerShellScripts\Join-Object.ps1 | |
$ThingsILike = 'Coffee','Whiskey','Food','ToMoveItMoveIt' | ForEach-Object -Process { | |
[PSCustomObject]@{ | |
Name = $_ | |
} | |
} | |
$ThingsICanDrink = 'Coffee;$true','Whiskey;$true','Food;$false' | ForEach-Object -Process { | |
$Name,$CanDrink = $_ -split ';' | |
[PSCustomObject]@{ | |
Name = $Name | |
CanDrink = $CanDrink | |
} | |
} | |
$JoinParams = @{ | |
Left = $ThingsILike | |
Right = $ThingsICanDrink | |
LeftJoinProperty = 'Name' | |
RightJoinProperty = 'Name' | |
Type = 'AllInLeft' | |
Prefix = 'InRight_' | |
} | |
Join-Object @JoinParams |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment