Jquery JSON响应日期不匹配

Jquery JSON响应日期不匹配,jquery,json,ajax,wordpress,Jquery,Json,Ajax,Wordpress,有人能解释一下这个问题吗?我正在使用下面的代码,从ajax请求输出JSON响应 console.log('get_therapist_sessions, response); response.forEach(function(index){ console.log(index); }); 但是,当我使用console.log时,日期是正确的,但检查实际对象时,日期是不正确的,我希望能够使用使用console.log时显示的日期 这是因为您的对象start\

有人能解释一下这个问题吗?我正在使用下面的代码,从ajax请求输出JSON响应

    console.log('get_therapist_sessions, response);
    response.forEach(function(index){
      console.log(index);
    });
但是,当我使用console.log时,日期是正确的,但检查实际对象时,日期是不正确的,我希望能够使用使用console.log时显示的日期


这是因为您的对象
start\u date
end\u date
都是日期对象,一开始不是字符串


如果要从日期转换为字符串,请尝试
start\u Date.toString()
end\u Date.toString()
。这就是
console.log()
没有告诉您的内容

恐怕没有区别,我也尝试过使用
字符串(index.start\u date)
没有区别的意思是什么?你有错误吗?
typeof(index.start\u date)
的输出是什么?更新的code
response.forEach(函数(index){console.log(index);console.log(typeof(index.start\u date));})
说这是一个字符串,我认为您必须多分享一点代码,因为我无法在这方面为您提供更多帮助:/do you在某处使用.ToJSON转换日期对象。它可以是时区偏移差。