| 注册
请输入搜索内容

热门搜索

Java Linux MySQL PHP JavaScript Hibernate jQuery Nginx

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'];

代码希望简洁,高效

3个答案

0

Hope you continue to share more of your ideas about coding in javascript.I will definitely love to read.  grandpa horror game

0

Great article. I found this much information, like what I'm looking for exactly. Thanks for such posts and please keep it up.

fnaf world​​​       

0

This is a great article. It gave me a lot of useful information. thank you very much. 
Vex 3