var func =(arr,w,h) => arr[arr.findIndex(el=>el[0]>h)-1][arr[0].findIndex(el=>el>w)-1]; console.log(func(price1Arr,2000,3000));