S
shotokan99
i have this code:
//-----------------------------------//
var custrec={
"customer":[
{
"id" : 123,
"name": "joy"
},
{
"id" : 555,
"name": "ritchie"
},
{
"id" : 666,
"name": "xander"
}
]
}
for(i=0; i<= 2; i++ ){
cust= custrec.customer.name;
id=custrec.customer.id;
document.write(id+' '+cust+'<br/>');
}
//-------------------------------//
on the for..loop i specified that it will loop until 2. is there a way
for me to automatically determine the number of records (am i using
the right term?) of custrec.cusomter . like a typrical
array....myarray.length.
tnx.
//-----------------------------------//
var custrec={
"customer":[
{
"id" : 123,
"name": "joy"
},
{
"id" : 555,
"name": "ritchie"
},
{
"id" : 666,
"name": "xander"
}
]
}
for(i=0; i<= 2; i++ ){
cust= custrec.customer.name;
id=custrec.customer.id;
document.write(id+' '+cust+'<br/>');
}
//-------------------------------//
on the for..loop i specified that it will loop until 2. is there a way
for me to automatically determine the number of records (am i using
the right term?) of custrec.cusomter . like a typrical
array....myarray.length.
tnx.