From e7e8c67b1cd786ef1eabf77a86a782595cdb4f86 Mon Sep 17 00:00:00 2001 From: Shreya Sarkar <95460021+zugzwang03@users.noreply.github.com> Date: Fri, 20 Oct 2023 17:53:53 +0530 Subject: [PATCH] Update index.js --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 9ce22e4..cc13889 100644 --- a/index.js +++ b/index.js @@ -140,7 +140,7 @@ searchForm.addEventListener("submit", function (e) { function searchStudentByName(apiData, searchQuery) { return apiData.filter((student) => - student.studentName.toLowerCase().includes(searchQuery) + student["Student Name"].toLowerCase().includes(searchQuery) ); } @@ -162,7 +162,7 @@ function displayResults(results) { const totalCompletionCell = row.insertCell(6); idCell.textContent = ind + 1; - nameCell.textContent = student.studentName; + nameCell.textContent = student["Student Name"]; statusCell.textContent = student["Enrolment Status"]; courseCompletedCell.textContent = student["# of Courses Completed"]; badgeCell.textContent = student["# of Skill Badges Completed"];