I have a php array that looks like this when I print it out:
Array
(
[0] => Array
(
[title] => Much title
[end] => Such end
[start] => Very start
)
[1] => Array
(
[title] => Much title
[end] => Such end
[start] => Very start
)
)
I've sent this array to my jQuery like so:
var orders = <?php echo json_encode($myArray); ?>;
When I do cosole.log(orders); I get 2 objects obviously.
Output:
Now I want to loop over them I tried like so:
jQuery.each( orders, function( key, value ) {
console.log( key + ": " + value );
});
This is giving me this output in my console:
0: [object Object]
1: [object Object]
Instead of the title, start and end values of every object.
Anyone has any idea how I can fix this?
Thanks in advance!

console.log( key, value );insteadtitle,startandendvalues?index, value, not key; you need to drill down one further level to get at the content ofvaluevalue.title-value.start-value.end