I'm struggling to create an array of arrays and I can't seem to figure out what's wrong with my code. Here's the snippet:
c.push({ id: data[0]["id"], title:data[v]["title"], date:data[v]["date"],
text:data[v]["text"], favorit:"true" });
$scope.favoriti.push({c});
c=[];
When I try to access the array using alert, it shows undefined.
alert( $scope.favoriti[0]["id"] );
Can someone please guide me on how to create this kind of array so that I can access it with the alert function? Your help is greatly appreciated! Thank you.