query.py json output modified

it has beed modified to [{ "results" : [{ data}] }]