Migrate a JavaScript object between versions