# Rails 3 basic Get JSON with jQuery and output on the page flow question

**URL:** <https://www.ruby-forum.com/t/rails-3-basic-get-json-with-jquery-and-output-on-the-page-flow-question/195600>\
**Category:** Rails\
**Created:** [September 26, 2010, 5:20pm UTC](https://www.ruby-forum.com/t/rails-3-basic-get-json-with-jquery-and-output-on-the-page-flow-question/195600 "2010-09-26T17:20:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nobosh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ecb155/32.png) [@nobosh](https://www.ruby-forum.com/u/nobosh)\
**Post date:** [September 26, 2010, 5:20pm UTC](https://www.ruby-forum.com/t/rails-3-basic-get-json-with-jquery-and-output-on-the-page-flow-question/195600/1 "2010-09-26T17:20:49Z")

</div>

Rails newbie, thanks for help with this hopefully basic JSON type  
question…

I have a model Books in my app, which belong\_to users.

What’d I’d like to learn how to do, is use jQuery to get a JSON object  
of the books that the user owns (current\_user). And then use jQuery to  
list the results out on a div (id=targetdiv).

Where I’m not certain, is this something Rails 3 does out of the box?  
Because I see the respond .js, but I think JSON is what is needed by  
jQuery, right?

Thanks for helping me learn this!

---

<div class="post-metadata">

**Author:** ![nobosh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ecb155/32.png) [@nobosh](https://www.ruby-forum.com/u/nobosh)\
**Post date:** [September 27, 2010, 6:25am UTC](https://www.ruby-forum.com/t/rails-3-basic-get-json-with-jquery-and-output-on-the-page-flow-question/195600/2 "2010-09-27T06:25:47Z")

</div>

you can have it respond a partial and in the partial have the iteration.  
I  
only use json if i need to do something with the data with the data with  
javascript but not the display some html list or table, for that i use  
simple erb.
