rcdmk / aspJSON

A fast classic ASP JSON parser and encoder for easy JSON manipulation to work with the new JavaScript MV* libraries and frameworks.
MIT License
204 stars 89 forks source link

Create a way to access items by index on JSONArray objects #6

Closed rcdmk closed 8 years ago

rcdmk commented 8 years ago

Create an easier way to access items from the collection by its index on JSONArray objects.

Something on the lines of a get(byval index) method can do it, and setting this as the default property will allow to call it directly, simulating the default array behaviour:

dim firstElement, secondElement
firstElement = oJSONarr.get(0)
secondElement = oJSONarr(1) ' default property makes it more natural