#14 Map Arrays

You can “convert” your array of objects into another array of different objects.  Lets say your first array contains a list of complex user models but you only care about the username and email properties for a certain action.  You could map the array like this.

Or if you had an array of numbers and you wanted to double each item, you could do:

Also published on Medium.

Published by

Emad Ibrahim

Author of asp .net MVC & TDD, entrepreneur, passionate technologist, programmer and productivity nut. more at http://t.co/oSJXPvzu