I have the following list:

```
[ 1, 2, 3, 4, 5, 6, 7, 8, 9]

```

And I want to group the elements according to the id number in this list:

```
[2, 1, 0, 0, 0, 1, 1, 2, 0]

```

so I get:

```
[[3, 4, 5, 9], [2, 6, 7], [1, 8]]

```

Thanks