initial (broken) implementation of getByKey for JSON convenience