-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest.js
More file actions
62 lines (58 loc) · 1.25 KB
/
Copy pathtest.js
File metadata and controls
62 lines (58 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
let todos = [];
var getRDSToDos = [
{
"ID": "100",
"NAME": "Clean room",
"DESCRIPTION": "Vaccum room, remove trash",
"PRIORITY": 3
},
{
"ID": "101",
"NAME": "Client presentation",
"DESCRIPTION": "Prepare PPT and reharse",
"PRIORITY": 2
},
{
"ID": "102",
"NAME": "Grocery shopping",
"DESCRIPTION": "Buy bread & meat",
"PRIORITY": 5
}
]
var getDynamoToDos = [
{
"id": "2313100",
"name": "Clean room",
"description": "Vaccum room, remove trash",
"priority": 3
},
{
"id": "344343423423",
"name": "Client presentation",
"description": "Prepare PPT and reharse",
"priority": 2
}
]
getDynamoToDos.forEach(element => {
todos.push(element);
});
todos.push(getRDSToDos.map(item => {
return {
id: item.ID,
name: item.NAME,
description: item.DESCRIPTION,
priority: item.PRIORITY
}
}));
// getRDSToDos = getRDSToDos.map(item => {
// return {
// id: item.ID,
// name: item.NAME,
// description: item.DESCRIPTION,
// priority: item.PRIORITY
// }
// });
// getRDSToDos.forEach(element => {
// todos.push(element);
// });
console.log(todos);