title: Smart way to convert multiple arrays in hash?
body: <p>I need an hint to convert four arrays into an hash. </p>
  
  <p>My post params has these four arrays:</p>
  
  <pre><code>"jcrop-x"=&gt;["0", "614", "0", "798"],
  "jcrop-y"=&gt;["0", "0", "273", "286"],
  "jcrop-x2"=&gt;["717", "666", "678", "482"],
  "jcrop-y2"=&gt;["567", "563", "529", "516"],
  </code></pre>
  
  <p>This is a sort of matrix: The value with index 0 of every array is the crop coordinates for my <code>main_image</code>. The second value is the crop coordinates for my <code>square_image</code>, etc.</p>
  
  <p>I need to populate an array with this structure:</p>
  
  <pre><code>crop_params{
        main_image: {x: 0, y: 0, x2: 717, y2: 567},
        second_image: {x: 614, y: 0, x2: 666, y2: 563},
        third_image: {x: 0, y: 273, x2: 678, y2: 529},
        fourth_image: {x: 798, y: 286, x2: 482, y2: 516} 
  }
  </code></pre>
  
  <p>This is my actual solution:</p>
  
  <pre><code>IMAGE_VERSION = [:main_news_img, :square_img, :vertical_img, :horizontal_img]
  crop_params = {}
  IMAGE_VERSION.each_with_index do |v,i|
    crop_params[v] = {}
    crop_params[v]["x"] = params['content']["jcrop-x"][i]
    crop_params[v]["y"] = params['content']["jcrop-y"][i]
    crop_params[v]["x2"] = params['content']["jcrop-x2"][i]
    crop_params[v]["y2"] = params['content']["jcrop-y2"][i]
  end
  </code></pre>
  
  <p>I can do that with many lines of code. Is there any smart way to keep my helper clean and readable?</p>