alert(object) calls object.toString() which returns [object Object] for any 
object. If you want to dump the contents of the object, loop through it and 
print each key-value pair.

-- 
Dheeraj Kumar


On Thursday 14 March 2013 at 10:22 AM, nikhil rn wrote:

> If I print the json object value from the controller, I am getting the 
> required output. But if I alert the same in the ajax, my output is as 
> below:
> 
> [object Object]
> 
> Nikhil
> 
> -- 
> Posted via http://www.ruby-forum.com/.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> (mailto:[email protected]).
> To post to this group, send email to [email protected] 
> (mailto:[email protected]).
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 


-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to