Reputation: 583
Have:
def render
begin
array= [:orange => 1,:limon => 3]
rescue Exception => e
puts e
end
end
how to return a array in one json
Upvotes: 2
Views: 1403
Reputation: 545
def render
begin
array= [:orange => 1,:limon => 3]
render :json => {:array => array},:callback => params[:callback]
rescue Exception => e
puts e
end
end
Upvotes: 3