Lets say I have a schema like this:

```
users: {
   friends: [{name: String, id: String}]
}

```

what is the fastest way to extract this object array into two separate arrays:

```
var names = [String]
var ids = [String]

```

Is there a way to do this without a for loop? This operation needs to be done for a set of users and im trying to avoid nested for loops. Maybe there is a better way to store the friends names and ids?