Log cannot output some json attributes.

  node.js, question

Because I need to merge two json without repeating keys, I wrote a simple merge function:

var $extend = function(a, b) {
 var target = b;
 for (var i in a) {
 target[i] = a[i];
 bracket
 return target;
 bracket

Then, I used this function to merge the following:

console.log(_doc);
 var toQuery=$extend(_doc,{'ak':config.ak,'output':'json'});
 //get result
 console.log('toQuery.output',toQuery.output);
 console.log('toQuery.ak',toQuery.ak);
 console.log('toQuery',JSON.stringify(toQuery));

However, the result output is very strange.

图片描述
ToQuery.output and toQuery.ak do have values, but why don’t these two key-value pairs exist after stringify?

I tried the main code on my browser and the output was normal.
Can the subject give a test page?