Hay, i have the following list
var feedObjects = {
0:[
"url",
"image"
],
1:[
"url",
"image"
]
}
However when i try doing feedObjects.length it always returns null, any ideas?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You have an
Object({}are the literalObjectnotation), not anArray, so there is nolengthproperty.You will need to iterate over it with
for ( in ), except this guarantees no ordering of the properties, unlike anArray(though in practice they generally come in the order defined).Better still, swap
{ }with[ ]and use a realArray(well as close as JavaScript’s arrays are to real ones).