# Javascript object to Ruby

**URL:** <https://www.ruby-forum.com/t/javascript-object-to-ruby/115321>\
**Category:** Rails\
**Created:** [September 23, 2007, 10:06pm UTC](https://www.ruby-forum.com/t/javascript-object-to-ruby/115321 "2007-09-23T22:06:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rene\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/97f17d/32.png) [@Rene\_R](https://www.ruby-forum.com/u/Rene_R)\
**Post date:** [September 23, 2007, 10:06pm UTC](https://www.ruby-forum.com/t/javascript-object-to-ruby/115321/1 "2007-09-23T22:06:21Z")

</div>

Hi,

How do I transfer a big amount of data stored in a javascript client  
side  
object to my Rails application? I want to store this object in my DB and  
after get it back some time after.

Thanks

Rene

---

<div class="post-metadata">

**Author:** ![Rene\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/97f17d/32.png) [@Rene\_R](https://www.ruby-forum.com/u/Rene_R)\
**Post date:** [September 24, 2007, 5:02am UTC](https://www.ruby-forum.com/t/javascript-object-to-ruby/115321/2 "2007-09-24T05:02:53Z")

</div>

Rene R. wrote:

> Hi,
> 
> How do I transfer a big amount of data stored in a javascript client  
> side  
> object to my Rails application? I want to store this object in my DB and  
> after get it back some time after.
> 
> Thanks
> 
> Rene

Rene,

I believe you are looking for is JSON:

[http://www.json.org/](http://www.json.org/)

Here is the Ruby implementation:

[http://json.rubyforge.org/](http://json.rubyforge.org/)

Basically, use a simple AJAX call but replace the X with JavaScript  
Object Notation (AJAJ?) to transfer the data back and forth between your  
client and the server.

David B. Williams  
[http://www.cybersprocket.com](http://www.cybersprocket.com)
