我正在创建一个实时评分网站。关于如何在一个页面上显示我的游戏记分牌,我遇到了难题。我想用来jquery/javascript
从文件中提取数据JSON
并从中创建多个表。
这是我的JSON
文件的内容。
{"basketball_scores":[
["basket001","15","12","7","34","10","12","4","26"],
["basket002","10","15","5","30","5","10","5","20"],
["basket003","3","4","2","9","4","6","10","20"],
["basket004","2","6","2","10","5","3","4","12"]
]}
我希望能够创建 4 个自动填充每个游戏的行和列的表。
这是我想显示的方式:
matchup half1 half2 ot final
home 15 12 7 34
away 10 12 4 26
那将是一张桌子。我想在该领域的其余部分继续这样做。
游戏数量未知,我以 4 为例。