(14) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}]
0: {date: "2019-11-28", views: "34731", clicks: "208", likes: "3834"}
1: {date: "2018-09-29", views: "69811", clicks: "361", likes: "5935"}
2: {date: "2017-12-30", views: "80107", clicks: "412", likes: "6526"}
3: {date: "2016-10-31", views: "88390", clicks: "445", likes: "6989"}
This is the array I have, I want to subtract object[0] with the object[1], and then with the value I got I want to print it and again, I want to subtract that value which I got previously with object[2] and get the value, print it and again subtract it with the object[3] and so on till the end and print the value in a table.
I want the end result of the array as given below
0: {date: "2019-11-28", views: "34731", clicks: "208", likes: "3834"}
1: {date: "2018-09-29", views: "35080", clicks: "153", likes: "2101"}
2: {date: "2017-12-30", views: "45027", clicks: "259", likes: "4425"}
3: {date: "2016-10-31", views: "43363", clicks: "186", likes: "2564"}