zantop 最近的时间轴更新
zantop

zantop

V2EX 第 327177 号会员,加入于 2018-07-05 18:36:43 +08:00
zantop 最近回复了
2020-07-30 17:29:45 +08:00
回复了 zantop 创建的主题 问与答 快 6 年前端开发北上广深城市工资都多少钱了
@deppindeepin 坦白了 21🌚
2020-07-30 16:50:02 +08:00
回复了 zantop 创建的主题 问与答 快 6 年前端开发北上广深城市工资都多少钱了
@sunjourney 这个回答我给你满分💯,哈哈
2020-07-30 16:24:33 +08:00
回复了 zantop 创建的主题 问与答 快 6 年前端开发北上广深城市工资都多少钱了
我也是这么想的
我是忘了指定 IdentityFile
2019-06-26 11:32:36 +08:00
回复了 Colorful 创建的主题 程序员 请教一个数组合并的问题
const arr1 = [
{ id: '150', name: '李三' },
{ id: '151', name: '李三 1' },
{ id: '152', name: '李三 2' },
{ id: '153', name: '李三 3' }
];

const arr2 = [
{ sname: '一级', otor: ['李三 1', '150'] },
{ sname: '一级 2', otor: ['李三 2'] },
{ sname: '一级 3', otor: ['153'] }
];

arr2.map((item, index) => {
const temArr = [];
item.otor.map((ele, idx) => {
const ar = arr1.filter((a, b) => ele === a.id || ele === a.name);
if (ar.length > 0) {
temArr.push(ar[0]);
}
});
item.otor = temArr;
});
console.log(arr2)
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3548 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 13ms · UTC 10:34 · PVG 18:34 · LAX 03:34 · JFK 06:34
Developed with CodeLauncher
♥ Do have faith in what you're doing.