>>> var dataArr = new Array();
>>> forEach(rData, function(rRow) {
>>> dataArr.push(values(rRow));
>>> });
>> Yes there is: var dataArr = map(values, rData);
It's a bad idea to use either of these solutions, since JavaScript
object properties are not ordered. While it may happen to be that the
keys produced by a ``for (k in o)`` (as in ``keys(o)`` and ``items(o)``)
loop are produced in a stable order in current browsers, it should not
be counted on. If some browser changes their implementation, the
columns in your table may change order or even contain data that belongs
in other columns. This is also asking for cross-browser differences, as
different JavaScript implementations are likely to differ on this point.
You should incorporate an array of the keys into either your code or the
data structure so that you can access them in the correct order.
--Tom
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---