title: JBuilder loop that produces hash
body: <p>I need loop that produces hash, not an array of objects. I have this:</p>
  
  <pre><code>json.service_issues @service.issues do |issue|
    json.set! issue.id, issue.name
  end
  </code></pre>
  
  <p>that results:</p>
  
  <pre><code>service_issues: [
    {
      3: "Not delivered"
    },
    {
      6: "Broken item"
    },
    {
      1: "Bad color"
    },
    {
      41: "Delivery problem"
    }
  ]
  </code></pre>
  
  <p>I need this:</p>
  
  <pre><code>service_issues: {
     3: "Not delivered",
     6: "Broken item",
     1: "Bad color",
     41: "Delivery problem"
  }
  </code></pre>
  
  <p>Is it possible to do this without converting AR result to hash manually? </p>