Google has depreciated the reference field.
This is just a little helper script to help you convert your reference fields to the new place_id field.
You'll need to make a few changes to this script for it to work for you.
- Change the [YOUR-API-KEY]with your own Google API key
- Add the references you need to lookup in the array, see var referencesToMigrate
- If you're updating a database, look for var sqlTemplate and change the table and field references