sql query to POST back as json