@rjlevy/

JS: lodash isEqual

HTML, CSS, JS

No description

fork
loading
Files
  • index.html
  • reference.txt
index.html
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
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
    <title>repl.it</title>
    <script src="https://cdn.jsdelivr.net/npm/lodash">
    </script>
  </head>
  <body>
    <script>
      const objectA = {
        "taskTypeId": 2,
        "taskStatusId": 40,
        "scheduleDate": null,
        "timeStarted": null,
        "timeCompleted": null,
        "taskOptionsId": 1,
        "taskAdditions": [
          23,
          27,
          28
        ]
      };
      const objectB = {
        "taskTypeId": 2,
        "taskStatusId": 40,
        "scheduleDate": null,
        "timeCompleted": null,
        "timeStarted": null,
        "taskOptionsId": 1,
        "taskAdditions": [
          23,
          27,
          28
        ],
      };
      const compare = _.isEqual(objectA, objectB);
      console.log(compare);
    </script>
  </body>
</html>

result
console