So I have little bit of a tricky problem right here:
I'm getting 5x2 arrays from this function
for (var i = 0; i < 5; i++) {
var name = $('.lesson-space:eq( ' + i + ' ) > .lesson').map(function(){return $(this).data('name');}).get();
var color = $('.lesson-space:eq( ' + i + ' ) > .lesson').map(function(){return $(this).data('color');}).get();
};
For each of these 5 repeats I want to put the two arrays into an object like this
{
"name": "deutsch",
"color": "red"
},
{
"name": "mathe",
"color": "blue"
},
{
"name": "sport",
"color": "darkblue"
},
{
"name": "franz",
"color": "yellow"
}
These objects should be put now into in array. So in the end I would like to have 5 arrays (from the first code snipped) put into one array like this
[
[
...
],[
...
],[
...
],[
...
],[
...
]
]
I know it's a bit complicated...