使用公共属性合并两个数组的最快方法是什么?
Users | Select *
Username : Joe.Doe
Office : Chicago
Email :
Username : Mike.Smith
Office : New York
Email :
...
Run Code Online (Sandbox Code Playgroud)
UserEmails | Select *
AccountEmail : Mike.Smith
EmailAddress : mike-smith@example.com
AccountEmail : Joe.Doe
EmailAddress : jsmith12@example.com
...
Run Code Online (Sandbox Code Playgroud)
合并应该导致:
UsersCompleteList | Select *
Username : Joe.Doe
Office : Chicago
Email : jsmith12@example.com
Username : Mike.Smith
Office : New York
Email : mike-smith@example.com
...
Run Code Online (Sandbox Code Playgroud)
类似的东西for each ($user in $users) { ($user.Email = $userEmails | ? { $_.AccountEmail -eq …