I have the following object:
var json = {
"0": (entry.points[0]) ? entry.points[0].points : '-',
"1": (entry.points[1]) ? entry.points[1].points : '-',
"2": (entry.points[2]) ? entry.points[2].points : '-',
"3": (entry.points[3]) ? entry.points[3].points : '-',
"4": (entry.points[4]) ? entry.points[4].points : '-',
...
}
What I want is to build that json in a for loop, and all the numbers will be the index. Is this possible?