TheRundown

फ्रीमियम
द्वारा TheRundown | अपडेट किया गया לפני יומיים | 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 שנים

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 שנים

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).

चर्चा में शामिल हों - नीचे टिप्पणी जोड़ें:

नई टिप्पणियाँ पोस्ट करने के लिए लॉग इन / साइनअप करें