andrewplummer/Sugar — Issue #47: Feature Request: Add a zip method to Array
Author: mlegenhausen
Created: 2011-11-07 14:08:50+00:00
State: open

Me again ;) I need a Python like zip method. There is a jQuery implementation: http://plugins.jquery.com/project/zip
I would call it zip cause it is the same principle as your zippers ;)

Implementation detail: When you call it on the array the array represents you keys and the given array are your values. E.g.:

```
var arr1 = [1,2,3];
var arr2 = [4,5,6];
var zipped = arr1.zip(arr2); // {1:4, 2:5, 3:6}
```