What's wrong with console.log ? :D json_data is an JSON Object
var json_data = {'title':'X-test', categories:['abc','def','ghi']}
After it's declaration I am adding more properties:
json_data.xAxis = {
categories: ['abc','def','ghi'],
labels: {
enabled: 1 // <---- notice that property enabled becomes 1
}
};
And then
console.log(json_data);
output:
categories: Array[7]
title: "X-test"
xAxis: Object
categories: Array[7]
labels: Object
enabled: false // <--- it's crucial!! :)
So next let's make a more specific dump:
console.log(json_data.xAxis.labels);
{enabled: 1}
<---- So the dump of only labels is correct
The first dump should have enabled:1, not false.
Why console.log() does that to me? :D
EDIT:
The variable json_data is set in $.each() few times - maybe it's because of that and lazynes of a console.log :)