var list_items = [ 0, { id_item: 1, name_item: 'CD Antler (008)', title_item: 'ompact Antler will fit into any interior thanks to its forms.', atricle_item: 'DE611090008', search_key_item: 'antler antler compact compact (008) 008 DE611090008 611090008', price_item: '9330', collection_item: 'Antler', type_item: 'unitaz', }, 1, { id_item: 2, name_item: 'CD Boston OAK (024)', title_item: 'ompact Antler will fit into any interior thanks to its forms.', atricle_item: 'DE611090008', search_key_item: 'boston compact the Boston compact (024) 024 DE721090024 721090024', price_item: '12333', collection_item: 'Boston', type_item: 'unitaz', } ]; console.log('list_items[0]' + list_items[0].name_item); console.log('list_items[1]' + list_items[1].name_item); console.log('list_items[2]' + list_items[2].name_item); console.log('list_items[3]' + list_items[3].name_item);
Why it fails with the following:
list_items[0]undefined
list_items[1]CD Antler (008)
list_items[2]undefined
list_items[3]CD Boston OAK (024)Can't understand why it skips 0 and 2, please help! Maybe I something doing wrong?