title: How to add index of each element in jbuilder
body: <p>In my Rails application I do the following to export all my data as a JSON string with jbuilder:</p>
  
  <p><strong>index.json.jbuilder</strong></p>
  
  <pre><code>json.array!(@react_exp) do |exp|
    json.id(**INDEX HERE**)
    json.createdAt((exp.created_at.to_f * 1000).to_i) 
    json.updatedAt((exp.updated_at.to_f * 1000).to_i) 
    json.extract! exp, :description
    json.categoryId(exp.category_id)
    json.extract! exp, :value
    json.day(exp.day.strftime('%Q').to_i)
  end
  </code></pre>
  
  <p>This works fine so far. What I want is to add the index of each element where it say <strong>INDEX HERE</strong> (as an ID for the resulting object).</p>
  
  <p>How can I achieve this?</p>