nesquena/rabl — Issue #141: Rendering an array of hashes
Author: simonc
Created: 2011-11-30 09:37:36+00:00
State: open

I would like to render an array of objects like this:

``` ruby
[{ name: "obj1", data: [1,2,3] }, { name: "obj2", data: [2,3,4] }]
```

And obtain something like this:

```
{"stats": [
{"name": "obj1", "data": [1,2,3]},
{"name": "obj2", "data": [2,3,4]}
]}
```

But the closest I could get looked like this:

```
{"stats":[
{"stat": {"name": "obj1", "data": [1,2,3]}},
{"stat": {"name": "obj2", "data": [2,3,4]}}
]}
```

How can I get rid of the useless "stat" level ?
Thanks