Adding objects from one array into another array

We start with two arrays (which must have a common element).  I was testing this in work using an Active Directory query and an output from another system.  The object of the exercise is to update one of the arrays with details from a second array using the common element between both arrays.  It sounds pretty straight forward and truth be told, its is.

Below are 2 arrays I have created for the test, copy them locally and try this yourself



As you can see the common see both arrays share the “social number” element. I want to add the addresses from array2 into array1 that correspond with the ‘social number’ in both

The example above is very basic but when you are working with very large arrays like your Active Directory contents, the output is very quick compared to running through loops.


  1. Can I simply say what a relief to find somebody that truly understands what they are talking about online.
    You actually know how to bring a problem to light and make it
    important. More and more people really need to look
    at this and understand this side of your story. I can’t believe
    you aren’t more popular given that you surely possess the

  2. Ahaa, its pleasant conversation concerning this post here at
    this website, I have read all that, so at this time
    me also commenting here.

  3. Hi Mike, first thanks for the work auornd , still dont understand why Microsoft didnt change it , because your are able to select domain local security groups when grant send-as permissions.But i got a small other issue with exchange 2010, i am using the domain local security group to set grant permissions to a shared mailbox. for a unknow reason the attribute msExchDelegateListLink of the shared mailbox does not get filled in. so users who are member of that group does not get the shared mailbox automatically in their outlook 2010. if i add the permissions per user the attribute get filledin within a few minutes and trhe users sees the shared mailbox in their outlook after 3 min. any help is greatley appriciated

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.