Returning array for results of /db with queries parameter present