code: function(obj) {
  		var arr = [];
  		for (var i in obj) {
  			arr.push({key: i, value: obj[i]});
  			delete obj[i];
  		}
  		return arr;
  	}
docs: convert object to array / array to object array in form [{key: <key>, value: <value>}, ...]