json.exams @exams.each do |exam| json.(exam, :id, :name, :difficulty, :quotes, :public) json.question_count exam.question_count json.total_score exam.total_score json.update_time exam.updated_at&.strftime("%Y-%m-%d %H:%M") json.apply exam.apply? json.author do json.login exam.user&.login json.name exam.user&.full_name end end json.exam_count @exams_count