Here is a little trick sentence I always say to myself when defining a map() function to remember what items to use in what order:
From this array I need this value, where this item in the array has this value
For example:
From All my contacts I need the emailaddress where company is Msquare.