I'm having a lot of difficulty with what seems to be a simple problem.
When I try to use the function, though, I end up with undefined values for
everything. Please help me! I have so many different object arrays that,
even though it wouldn't make it too long, it would make it easier to write.
This is what I have in my code:
function ObjectArray2String (ObjArray, sDelim) {
var sString="";
var prop, obj;
for (obj in ObjArray) {
for (prop in ObjArray[obj]) {
sString = sString + ObjArray[obj].prop + sDelim;
}
sString += sDelim;
}
return sString.substr(0,sString.length-2);
}
And within another function, I call this one with:
sData = ObjectArray2String(objData, "&");
What I end up with, if I display the sData variable in an alert, is:
undefined&undefined&&undefined&undefined&&undefined&undefined
Please help,
Chris