got visit data to the database and render json