I have function for search value of column in list, and it looks like this
function search(list, column, key) {
var result = []
for (var i in list) {
if (list[i].column.includes(key)) { //I think it will looking any field named column instead takes the one from parameter
result.push(list[i])
}
}
return result
}
The problem is how do i change which column i use dynamically based on parameter of the function? Thanks.