I know that I can search this array of objects by using a for loop and if statement,
var junkData = [
{ "ID": "1", "AreaName": "Area A Tester" },
{ "ID": "2", "AreaName": "Area B Test" },
{ "ID": "3", "AreaName": "Area C" },
{ "ID": "4", "AreaName": "Area D 12" },
{ "ID": "5", "AreaName": "Area E" }
];
but which other ways are available to me? I would like to search on the ID and then return that object. So if I wanted to search for ID 3, then it would return the object whose ID is 3.
What other options are available outside of using a for loop with an if statement?