JSON属性响应未识别

时间:2018-05-30 08:42:43

标签: jquery json

这让我发疯了......

var _my_obj = my_function(); // Connects to a server and gets data formated as JSON.

console.log(_my_obj); // Shows me the Object and all its attributes.

console.log(_my_obj.count); // Shows me "unidentified". And I am sure "count " attribute exists.

任何想法???

对象

   count: 10
    responseJSON: {status: "ok", count: 10, count_total: 12528, pages: 1253, posts: Array(10), …}
    _models_total: 12528

1 个答案:

答案 0 :(得分:0)

第一个console.log将变量_my_obj作为参数,而第二个采用未声明的变量_myobj。第二个变量是否在其他地方声明了?

相关问题