Here is the input:

```
[{animal: "cat"}, {animal:"dog}}

```

And the output would be :

```
[{animal: "cat", idx: 1}, {animal: "dog", idx: 2}]

```

Does anyone have ideas about how to do this in Lodash/Underscore.js?