JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://documentcloud.github.com/underscore/underscore.js"></script>
JavaScript
var a = {
name : "Foo",
amount: 55,
reported : false,
date : "10/01/2001"
};
var map = {
name : "id",
amount : "total",
reported : "updated",
date : "issued"
};
b = _.reduce(a, function(result, value, key) {
key = map[key] || key;
result[key] = value;
return result;
}, {});
console.log(b);