I have the variables in place and onclick function set up but I can't figure out how to turn this object into an array within an array. I'm trying to turn this
{"Wins":30,"Losses:"32}
into this:
[["Wins:",30]["Losses:",32]]
So I can append it to the data.addRows:
var data = new google.visualization.DataTable();
data.addColumn('string', 'Topping');
data.addColumn('number', 'Total: ');
data.addRows([
['String', number],
['String', number],
]);
Object.entries[["Wins:",30], ["Losses:",32]]. And why keep the:in"Wins:"?westTeamData = JSON.stringify({"Wins": westTeamWins, "Losses": westTeamLosses})is shows up as{"Wins":30,"Losses":32}I'm trying to have thewestTeamDatavariable converted to an array within an array so I can append it todata.addRows(). Using theobject.entries(westTeamData)im unfortunately returning an array of each individual character.