function getOddsOu(fixtureId, thn, tan) { getData('fixtures/' + fixtureId + '/analysis/odds/ou', null, (data) => { // console.log(data); if (!data?.odds?.length) { return; } const odds = data?.odds; const teams = { 'home': [], 'away': [] }; const teamTypes = ['home', 'away']; for (const i in odds) { const o = odds[i]; teams[o.team].push(o); } html = ``; html += `
`; html += `
`; html += `
`; html += `

${thn}

`; html += `
`; html += `

สูงต่ำ/คู่คี่

`; html += `
`; html += `

${tan}

`; html += `
`; for (const i in teamTypes) { const team = teamTypes[i]; const os = teams[team]; html += `
`; html += ``; html += ``; html += ``; if (team == 'home') { html += ``; } else { html += ``; } html += ``; html += ``; html += ``; html += ``; html += ``; html += ``; html += ``; html += ``; html += ``; for (const k in os) { const o = os[k]; html += ``; html += ``; html += ``; html += ``; html += ``; html += ``; html += ``; html += ``; } html += ``; html += `
สูงต่ำเสมอคี่คู่
${o.name}${o.over}${o.under}${o.draw}${o.odd}${o.even}
`; html += `
`; } html += `
`; html += `
`; $('#oddsOverUnderSection').html(html); }, (error) => { console.log(error); }); }