Using the below piece of logic we are trying to loop the records which are in DB suppose if I have 1000 rows then it is getting iterated 1000 times where it is taking more time instead of doing this how can I make it simpler and achieve the results quickly
for (var row in db) {
if (db.hasOwnProperty(row)) {
if (currentid == db[row].actualid)
optionsHtmlString += '<option value="' + db[row].MemberId + '" selected="selected" title="' + db[row].FullName + '">' + db[row].FullName + '</option>';
else
optionsHtmlString += '<option value="' + db[row].MemberId + '" title="' + db[row].FullName + '">' + db[row].FullName + '</option>';
}
}