[
{"lastName":"Noyce","gender":"Male","patientID":19389,"firstName":"Scott","age":"53Y,"},
{"lastName":"noyce724","gender":"Male","patientID":24607,"firstName":"rita","age":"0Y,"}
]
The data above represents a JSON object.
var searchBarInput = TextInput.value;
for (i in recentPatientsList.length) {
alert(recentPatientsList[i].lastName
}
I am successfully receiving alerts for the last names. Now, I have a text input where users can search for a specific value within the JSON data. In this case, they are searching for the last name value.
How can I extract the input value and use it to search within my JSON data?