I'm creating a function to filter my javascript objects.
function filter(array,filterName,filterCondition,filterParameter){
    for(var i=0; i< array.length;i++){
        if(array[i][filterName] -<convert FilterCondition here>- filterParameter){
        }
    }
}
and ideally I would like to use it like this:
filter(anArray,"age",">",10)
Is it possible to convert a string comparison operator into a real operator in my if statement?
 
     
    