javascript - Using index to pull items from an object -
if have object items named , ending in sequential numbers:
var theobject = { item1:, item2:, item3:, ...etc }
this method of extracting objects , used in loop not seem work. should work provided rest of function correct?
theobject.item+i
you can theobject['item'+i]
. can better using jquery foreach can iterate on keys.
Comments
Post a Comment