[
{"lastName":"Noyce","gender":"Male","patientID":19389,"firstName":"Scott","age":"53Y,"},
{"lastName":"noyce724","gender":"Male","patientID":24607,"firstName":"rita","age":"0Y,"}
]
When comparing my input with the JSON data, I utilize a loop to search for a specific last name.
for (var i = 0; i < recentPatientsList.length; ++i) {
if (searchBarInput === recentPatientsList[i].lastName) {
alert("Found at index " + i);
}
}
By using this method, I can determine if there is a match between my input and the JSON dataset. I am now seeking ways to retrieve data based on last names that start with 'N' or any other user-defined input.