code: function prep(obj) {
  		if (obj.__c) {
  			// object is entity
  			var data = { c: [], attr: {} };
  			obj.trigger("SaveData", data, prep);
  			for (var i in obj.__c) {
  				data.c.push(i);
  			}
  			data.c = data.c.join(', ');
  			obj = data;
  		}
  		else if (typeof obj == 'object') {
  			// recurse and look for entities
  			for (var prop in obj) {
  				obj[prop] = prep(obj[prop]);
  			}
  		}
  		return obj;
  	}
docs: /* recursive function
  searches for entities in an object and processes them for serialization