title: Appending to Json Array in ruby on rails
body: <p>I am working with backbone.js as front end that receives a json result from controller like this </p>
  
  <pre><code>def index
      myEntry = Entry.all
      respond_with myEntry.to_json()
  end
  </code></pre>
  
  <p>The resulting json arrays is collection of objects as follows </p>
  
  <pre><code>0:Object
    id:1
    name:matz
  1:object
    id:2
    name: hilary
  </code></pre>
  
  <p>Now i have for each name an extra tag field that is stored using <a href="https://github.com/mbleigh/acts-as-taggable-on" rel="nofollow">act-as-taggable-on gem</a>. To access the tag of any entry i would have to use <strong>Entry.find(1).tag_list.</strong>
  I would like to append the result of each tag to its respective object from above, to get result something like this </p>
  
  <pre><code>0:Object
    id:1
    name:matz
    tag:friend,rich
  1:object
    id:2
    name: hilary
    tag:intelligent
  </code></pre>