Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Answer

added 1 characters in body; added 40 characters in body
Source Link
Pointy
  • 415.2k
  • 62
  • 600
  • 633

This is why The Creator gave the world arrays.

var msgs = [];
for (var i = 0; i < 200; ++i)
 msgs.push(parseFloat[json[i]['valor'parseFloat(json[i]['valor' + i]));

Note that your JSON data should also keep those "valor" properties as arrays, though in JavaScript you can deal with a bizarre naming scheme like that as in the example above.

edit — oops, typos fixed :-)

This is why The Creator gave the world arrays.

var msgs = [];
for (var i = 0; i < 200; ++i)
 msgs.push(parseFloat[json[i]['valor' + i]);

Note that your JSON data should also keep those "valor" properties as arrays, though in JavaScript you can deal with a bizarre naming scheme like that as in the example above.

This is why The Creator gave the world arrays.

var msgs = [];
for (var i = 0; i < 200; ++i)
 msgs.push(parseFloat(json[i]['valor' + i]));

Note that your JSON data should also keep those "valor" properties as arrays, though in JavaScript you can deal with a bizarre naming scheme like that as in the example above.

edit — oops, typos fixed :-)

Source Link
Pointy
  • 415.2k
  • 62
  • 600
  • 633

This is why The Creator gave the world arrays.

var msgs = [];
for (var i = 0; i < 200; ++i)
 msgs.push(parseFloat[json[i]['valor' + i]);

Note that your JSON data should also keep those "valor" properties as arrays, though in JavaScript you can deal with a bizarre naming scheme like that as in the example above.

lang-js

AltStyle によって変換されたページ (->オリジナル) /