I have the following data:
I want to load it into an array and then retrieve any of its values by calling its position in the array, i.e. arrBill.At(0).
How do I load it up to begin with?
Develop games in your browser. Powerful, performant & highly capable.
there are many ways to do it - if the data isn't likely to change after you export your game, then you can copy and paste the data into a text variable and use tokencount and tokenat to break it apart and put in the array.
you could also add a text file to the project and load that, or you can use AJAX to request the data from a database, or other external source at runtime.
I made a quick sample of the first option...