query to obj