Had to rename the var to foKey, otherwise its seen as the `for` keyword. Test script can be found here http://regex.info/code/JSON.lua