What type of structure is this, and how to I make such using a loop?
var movies = [
{ Name: "The Red Violin", ReleaseYear: "1998" },
{ Name: "Eyes Wide Shut", ReleaseYear: "1999" },
{ Name: "The Inheritance", ReleaseYear: "1976" }
];
I am using each for the loop
$.each(result, function(key, value){
movies??? = this.name;
movies??? = this.year;
});
It’s an array of objects:
You can see that the wrapping structure is an array:
And that each element is an object: