I pulled out the data from the database using JSON and received the data as below.
var data = [
{
"view_id": "999999999",
"month" : 01,
"year" : 2017,
"visit" : 2000
},
{
"view_id": "999999999",
"month" : 02,
"year" : 2017,
"visit" : 3000
},
{
"view_id": "999999999",
"month" : 01,
"year" : 2018,
"visit" : 4000
},
{
"view_id": "999999999",
"month" : 02,
"year" : 2018,
"visit" : 9000
},
{
"view_id": "000000000",
"month" : 01,
"year" : 2017,
"visit" : 6000
},
{
"view_id": "000000000",
"month" : 02,
"year" : 2017,
"visit" : 7000
},
{
"view_id": "000000000",
"month" : 01,
"year" : 2018,
"visit" : 12000
},
{
"view_id": "000000000",
"month" : 02,
"year" : 2018,
"visit" : 15000
},
];
I would like to present the data in the table:
However, my problem is to group the data so that it is for the given view_id
and year.
Can you help me in this way to show me in the table as I showed you?