-2

I've a little problem with a simple thing.I believe. this is my code...

javascript code

I'm able to grab the first object element but I need all the data object, I guess I've to change something in this code line...

value[0]['firstName'];
Elia Marotta
  • 13
  • 1
  • 5
  • 3
    Please post your code not only image. – Oleksandr T. Jan 21 '16 at 11:34
  • `gennaio` is an array. You will have to loop over it as well. Also, Its a bad practice to append inside a loop. Create an html string and append it to this string and at the end, set this string. – Rajesh Jan 21 '16 at 11:39
  • @Rajesh can you show me how to do this with a short example ?! Thank you – Elia Marotta Jan 21 '16 at 13:27
  • @EliaMarotta If you put your code instead of snapshot, there are many smarter people than me than can help you. – Rajesh Jan 21 '16 at 13:32

1 Answers1

0

You need to replace

value[0]['firstName'];  // $.each()

With

value[index]['firstName'];   // $.each()  

And

$.each(oggprova.PIANIFI,function(){...});  

with

$.each(oggprova.PIANIFI.gennio,function(){....});
ozil
  • 6,930
  • 9
  • 33
  • 56