質問編集履歴

2

一部訂正

2021/06/23 01:47

投稿

aoaoao
aoaoao

スコア1

test CHANGED
File without changes
test CHANGED
@@ -1,6 +1,6 @@
1
1
  jsで多次元配列の重複削除について教えていただきたいです。
2
2
 
3
- 配列のidとnameがともに同じ値の場合、重複削除して1ペアのみ残したいです。
3
+ 要素同士が持つidとnameがに同じ値の場合、重複削除して1ペアのみ残したいです。
4
4
 
5
5
 
6
6
 

1

一部訂正

2021/06/23 01:47

投稿

aoaoao
aoaoao

スコア1

test CHANGED
File without changes
test CHANGED
@@ -8,21 +8,21 @@
8
8
 
9
9
  var arr = [
10
10
 
11
- [id:111 , name:"aaa" , date:003 , file:004],
11
+ {id:111 , name:"aaa" , date:003 , file:004},
12
12
 
13
- [id:111 , name:"bbb" , date:003 , file:004],
13
+ {id:111 , name:"bbb" , date:003 , file:004},
14
14
 
15
- [id:222 , name:"aaa" , date:003 , file:004],
15
+ {id:222 , name:"aaa" , date:003 , file:004},
16
16
 
17
- [id:222 , name:"bbb" , date:003 , file:004],
17
+ {id:222 , name:"bbb" , date:003 , file:004},
18
18
 
19
- [id:111 , name:"aaa" , date:003 , file:004],
19
+ {id:111 , name:"aaa" , date:003 , file:004},
20
20
 
21
- [id:111 , name:"aaa" , date:003 , file:004],
21
+ {id:111 , name:"aaa" , date:003 , file:004},
22
22
 
23
- [id:333 , name:"ccc" , date:003 , file:004],
23
+ {id:333 , name:"ccc" , date:003 , file:004},
24
24
 
25
- [id:222 , name:"bbb" , date:003 , file:004],
25
+ {id:222 , name:"bbb" , date:003 , file:004},
26
26
 
27
27
  ]
28
28
 
@@ -34,15 +34,15 @@
34
34
 
35
35
  var arr = [
36
36
 
37
- [id:111 , name:"aaa" , date:003 , file:004],
37
+ {id:111 , name:"aaa" , date:003 , file:004},
38
38
 
39
- [id:111 , name:"bbb" , date:003 , file:004],
39
+ {id:111 , name:"bbb" , date:003 , file:004},
40
40
 
41
- [id:222 , name:"aaa" , date:003 , file:004],
41
+ {id:222 , name:"aaa" , date:003 , file:004},
42
42
 
43
- [id:222 , name:"bbb" , date:003 , file:004],
43
+ {id:222 , name:"bbb" , date:003 , file:004},
44
44
 
45
- [id:333 , name:"ccc" , date:003 , file:004],
45
+ {id:333 , name:"ccc" , date:003 , file:004},
46
46
 
47
47
  ]
48
48