I am running a Postgres query in python which returns me an array of JSON objects.
db = SQLDB('postgres://postgres:*****@localhost:5433/postgres', migrate=False)
q = ("SELECT row_to_json(t) FROM (SELECT * FROM fn_drivetime_eu_grid_" + request.get_vars.country + "_coord(" + request.get_vars.x + ", " + request.get_vars.y + ", " + request.get_vars.sec + ")) t;")
mySQL = db.executesql(q)
return json.dumps(mySQL)
The problem is that the objects are inside objects. Dawg!
Not a big problem, but I would like to know whether there is a more elegant solution for this.