I have a json array in which i have a list of data. I wanna create a search filter that returns an entire row that matches the key word. for example if my json array is like this :
var data = { "list":[
{
"engine":"Gecko",
"browser":"Firefox 1.0",
"platform":"Win 98+ / OSX.2+",
"version":"1.7",
},
{
"engine":"Tatsman",
"browser":"Firefox 1.5",
"platform":"Win 98+ / OSX.2+",
"version":"1.8",
},
]}
and listed the data in a table format
var output="<ul>";
for (var i in data.list) {
output+="<ul>"+"<li id='first'>"+ data.list[i].engine + " " +"</li>"+"<li id='second'>"+ data.list[i].browser +" "+"</li>"+"<li id='third'>"+data.list[i].platform+" "+"</li>"+"<li id='fourth'>" + data.list[i].version + " " +"</li>"+"</ul>";
output+="</ul>";
document.getElementById("lidynamic").innerHTML=output;
}
Now i need a search box that returns the whole entire row. for example if i search for 'tatsman' the entire row should be displayed that contain the value 'tatsman'. I got several ideas but all belong to jquery library. I need javascript only.
first,second, ...) classes instead