I need to convert a js object to another object for passing onto a server post where the names of the keys differ for example
var a = { name : \"Foo\",
No there is no function in either library that explicitly renames keys. Your method is also the fastest (see jsperf tests.) Your best bet, if possible, is to refactor either the client side or server side code so the objects are the same.