• I am still working on a frontend solution to submit results and statistics. Currently I am trying to set the columns which shall be visible in the Box Score section of an event, when the statistics are submitted. In the following javascript code you can see the data which is send to the URL via POST method. Everything is working fine, except the “0” key at the end which contains the column data. After submitting the data, the column field is still empty and looks like this “0” : [ ]. If I change the “0” key to “1” i.e., it will also add an empty “1” : [ ] without data. I tried using square brackets [ ] around the data field, like this 0: [{…}] which only works with another key than 0.

    Am I doing something wrong?

    var data = { players: players, offense: offense, defense: defense, performance: { [team_id]: { [c_id]: { goals: c_goals, assists: c_assists, plusminus: c_pm, pim: c_pim, ppg: c_ppg, shg: c_shg, sht: c_sht, chk: c_chk, fo: c_fo, fow: c_fow, stars: c_stars, }, }, 0: { goals: 'T', assists: 'A', plusminus: '+/-', pim:'STM', ppg:'PPT', shg:'UZT', sht:'S', chk:'Chk', fo:'BU', fow:'BUG', stars:'Stars' } } };

    • This topic was modified 8 years, 4 months ago by sagund07.
  • The topic ‘REST API: Set Box Score Columns’ is closed to new replies.