title: Rails jbuilder: how to build a JSON from an array with the key equals to the array values
body: <p><br>
  I'm a pretty new Rails developer, I'm using <a href="https://github.com/rails/jbuilder" rel="nofollow">Jbuilder</a> to build my view in the following way:</p>
  
  <pre><code>[:aaa, :bbb, :ccc].each do |value|
    json.value do |json| #&lt;------ Here is my error!
      json.partial! foo.send(value)
    end
  end
  </code></pre>
  
  <p>Everything works BUT the <code>json.value</code>, my response is the following (obviously):</p>
  
  <pre><code>[{
  "value" =&gt; {...}
  "value" =&gt; {...}
  "value" =&gt; {...}
  }]
  </code></pre>
  
  <p>I'd like to have this one instead:</p>
  
  <pre><code>[{
  "aaa" =&gt; {...}
  "bbb" =&gt; {...}
  "ccc" =&gt; {...}
  }]
  </code></pre>
  
  <p>Any ideas?</p>