View

```
<%= link_to "Link", {:action => "AjaxView",:col => "colname"}, :update => "Ajaxcall", :remote => true %>

```

Controller

```
def AjaxView
  @vars= Var.find(:all,:conditions => { :varName=> "one" },:select=>(params[:col]))
 respond_to do |format|
   format.js { render :layout=>false }
end
end

```

AjaxView.js.erb

```
$("#3").text("<%= escape_javascript(render(:partial => "var", 
                                           :collection => @vars)) %>");

```

\_var.html.erb

```
<%= var.col1 %>

```

Now it returns all values from Column, need them one by one ?

Current output is: "amit1 amit2 amit3 amit4" as single string
I want to get these values one by one, so that I can map it with Div id and publish them in Grid

Desired Output is : "amit1"