This array contains plain objects. You can access any of the properties like this zingerManufacturingData[0].Month, zingerManufacturingData[1].Widget, etc.
To change the variable names, do this,
var zingerManufacturingData = [ {differentVar: "January '03", anotherVar:885202, Blinkies: 184454, monthIdx:1 }, {differentVar: "February '03", anotherVar:683392, Blinkies: 945385, monthIdx:2 }, {differentVar: "December '03", anotherVar:800254, Blinkies: 826652, monthIdx:12 } ];
In that example Month was changed to differentVar and Widgets was changed to anotherVar. Hope that is what you were looking for J
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Dzafer
Hi All,
What kinds of object are in this Array?
var zingerManufacturingData = [ {Month: "January '03", Widgets:885202, Blinkies: 184454, monthIdx:1 }, {Month: "February '03", Widgets:683392, Blinkies: 945385, monthIdx:2 }, {Month: "December '03", Widgets:800254, Blinkies: 826652, monthIdx:12 }
];
And how can I put a variable instead of “Month”, “Widgets” ?
Thank you, Dzafer
Yahoo! Groups Links
|
- [flexcoders] Wha kinds of object are in this Array? Dzafer
- RE: [flexcoders] Wha kinds of object are in this Array... Mercer, Dustin
- RE: [flexcoders] Wha kinds of object are in this Array... Mercer, Dustin
- Re: [flexcoders] Wha kinds of object are in this A... Manish Jethani
- RE: [flexcoders] Wha kinds of object are in this Array... Tracy Spratt