preparing the json structure i'll store in rethinkdb