put res.json into query