arturadib / agility

Javascript MVC for the "write less, do more" programmer
http://agilityjs.com
MIT License
542 stars 70 forks source link

Data Indirection, Massage, and Transformation #103

Open jonathaneunice opened 11 years ago

jonathaneunice commented 11 years ago

I needed a way to get data from a web framework that doesn't give it back entirely "cleanly." For example, it doesn't hand back a list of data items in a simple JSON array; it hands back an object with a single attribute that names the list of data items. Also, servers and clients often have different needs and expectations about the JSON data they're jointly using. This patch provide a simple but quite general mechanism to do data transforms as data is loaded, saved, or gathered.