title: Converting JSON array of [object, Object], [object, Object] to actual values?
body: <p>I have this in my controller:</p>
  
  <pre><code>  def selectmodels
      @brand = Brand.find_by_name(params[:brand_name])
      @models = Model.where(:brand_id =&gt; @brand.id)
      render json: @models
    end
  </code></pre>
  
  <p>The returned code is processed by:</p>
  
  <pre><code>$.ajax({
      url: '/selectmodels?brand_name=' + test, type: 'get', 
      dataType: 'json',
      processData: false,
      success: function(data) {
          if (data == "record_not_found") {
              alert("Record not found");
          }
          else {
              alert(data);
              $('#style_model_name').autocomplete({ source: data });
          }
      }
  });
  </code></pre>
  
  <p>I would like to have the "data" keys and values loaded up into my autocomplete text-field.</p>
  
  <p>Thanks!</p>
  
  <p>UPDATE: </p>
  
  <p>I receive the following:</p>
  
  <pre><code>[{"brand_id":1,"created_at":"2012-04-09T03:12:43Z","id":1,"name":"x","updated_at":"2012-04-09T03:12:43Z"},{"brand_id":1,"created_at":"2012-04-09T03:15:54Z","id":2,"name":"y","updated_at":"2012-04-09T03:15:54Z"},{"brand_id":1,"created_at":"2012-04-09T09:33:59Z","id":5,"name":"z","updated_at":"2012-04-09T09:33:59Z"}]
  </code></pre>