Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ORM for Javascript/JSON

I am working on a web application that gets JSON data from the server (Ruby/Rails) into the client using jQuery/ajax and then renders it to the browser using jQuery to populate the DOM. To simplify access to my data on the client side, I would like to use an object-relational mapper similar to ActiveRecord, but which starts with JSON data instead of data directly from a SQL data source.

Are there any such ORMs in Javascript that convert a JSON data set (itself derived from a set of SQL queries on the server side) to a set of ActiveRecord-like objects?

like image 595
Jay Godse Avatar asked Apr 08 '26 14:04

Jay Godse


1 Answers

I may be missing something here, but JSON (JavaScript Object Notation) is already a Javascript object in and of itself.

If the data you are getting from the server doesn't map well to a usable Javascript object, I would argue that it's the server side that needs to change to return a more useful serialized object rather than a simple recordset.

like image 190
Justin Niessner Avatar answered Apr 11 '26 03:04

Justin Niessner



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!