我正在尝试从另一个数组中过滤一个数组:
我有第一个数组:
var json = [["ID1", "Person1", "10"], ["ID2", "Person2", "20.0"], ["ID3", "Person3", "50.0"], ["ID4", "Person4", "40.0"]];
我的过滤器数组:(未排序);
var filter = ["ID4", "ID1"];
我想要的结果是:
var json = [["ID1", "Person1", "10"], ["ID4", "Person4", "40.0"]];
或者
var json = [["ID4", "Person4", "40"], ["ID1", "Person1", "10.0"]];