TheRundown

부분 유료
분류별 TheRundown | 업데이트됨 2 days ago | Sports
인기

9.7 / 10

지연 시간

249ms

서비스 수준

100%

Health Check

100%

모든 토론으로 돌아가기

Why would you use an integer as a key?

Rapid account: Sandtr 0 Ut
sandtr0ut
5 years ago

or asked another way, why make “lines” and object and not an array?
data.events[i].lines.2.spread… seems not to work (i.e. dot-notation WILL not work with this setup). Anyone have any thoughts on how to access this data in my node-code using dot-notation or otherwise?

Rapid account: Therundown
therundown Commented 5 years ago

The lines are an object to allow efficient (O(1)) selection of specific sportsbook’s odds. When using JavaScript or NodeJS, you will need to use the following to access the data:

data.events[i].lines[1].spread

which results in a single additional character (two brackets instead of a single dot).

아래에 의견을 추가하고 토론에 참여하세요.

새 댓글을 게시하려면 로그인 / 가입