• js知道value值的一個數組,根據字典關系數據篩選出對應的text值的數組

    0
    var values = ['1','2','4'];
    var data = [{value:'1',text:'清香1'},
                {value:'2',text:'清香2'},
                {value:'3',text:'清香3'},
                {value:'4',text:'清香4'},
                {value:'5',text:'清香5'},
                {value:'6',text:'清香6'}];
                
    

    我需要得到 與values對應的text值的數組
    例如:var texts = ['清香1','清香2','清香4'];

    代碼希望簡潔,高效

    相似問題

    相關經驗

    相關資訊

    相關文檔

  • sesese色