title: How to save JSON objects into an array
body: <p>i want to save objects into an array. I have JSON objects and I want to save every object in an array to access every element alone.
  Can anybody help me?</p>
  
  <pre><code>toArray = JSON.parse(res.body)
  
  categ = Array.new
  i = 0
  
  toArray.each do |object|
  newMyObject = MyObject.new(object)
  categ = Array.new(i, newMyObject)
  i = i+1
  end
  </code></pre>