Uncaught TypeError: Cannot use 'in' operator to sea
2016-10-22 19:41
766 查看
Uncaught TypeError: Cannot use 'in' operator to search for 'length' in
[{"tree_id":38,"tree_name":"我是一棵小小的树,但我还是一颗小小的树 ^0^","tree_node":38,"tree_order":1,"tree_contexts":"2"},{"tree_id":39,"tree_name":"我是一棵小树 ^0^","tree_node":38,"tree_order":1,"tree_contexts":"2"},{"tree_id":40,"tree_name":"谢谢博主^0^","tree_node":38,"tree_order":11,"tree_contexts":"2"},{"tree_id":41,"tree_name":"我是一棵目录树","tree_node":38,"tree_order":1,"tree_contexts":"2"},{"tree_id":42,"tree_name":"我是一棵目录树","tree_node":38,"tree_order":1,"tree_contexts":"2"}]
解决方案:JSON字符串转换为JavaScript对象
91道奇网
[{"tree_id":38,"tree_name":"我是一棵小小的树,但我还是一颗小小的树 ^0^","tree_node":38,"tree_order":1,"tree_contexts":"2"},{"tree_id":39,"tree_name":"我是一棵小树 ^0^","tree_node":38,"tree_order":1,"tree_contexts":"2"},{"tree_id":40,"tree_name":"谢谢博主^0^","tree_node":38,"tree_order":11,"tree_contexts":"2"},{"tree_id":41,"tree_name":"我是一棵目录树","tree_node":38,"tree_order":1,"tree_contexts":"2"},{"tree_id":42,"tree_name":"我是一棵目录树","tree_node":38,"tree_order":1,"tree_contexts":"2"}]
解决方案:JSON字符串转换为JavaScript对象
$.parseJSON(data)
91道奇网
相关文章推荐
- ...Uncaught TypeError: Cannot use 'in' operator to search for“length”in { json数据 }
- 解决 js报错:Uncaught TypeError- Cannot use 'in' operator to search for 'length' in [{"id":"636","...
- ERROR in Cannot use 'in' operator to search for 'providers' in null
- jquery each报 Uncaught TypeError: Cannot use 'in' operator to search for错误
- ionic3+angular4中给DOM添加监听事件后报错:Uncaught (in promise): TypeError: Cannot read property 'addEventListen
- 前台解析有后台传过来的json数据时报错 Cannot use 'in' operator to search for 'length' in......
- 【Angular2】Uncaught (in promise): TypeError: Cannot read property 'id'
- Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>'
- Server Error in '/' Application. Cannot use a leading .. to exit above the top directory
- 关于Uncaught TypeError: Cannot read property 'toLowerCase' of undefined的问题
- Uncaught TypeError: Cannot read property 'toLowerCase' of undefined
- Vue报错:Uncaught TypeError: Cannot assign to read only property’exports‘ of object’#<Object>‘的解决方法
- Error 1 Operator '+' cannot be applied to operands of type 'string' and 'method group'
- php错误 Fatal error: Cannot use object of type stdClass as array in……
- Apache Address already in use: make_sock: could not bind to port 80 or 443 error and solution
- ERROR: "This virtual machine appears to be in use"
- 虚拟机无法打开——显示Cannot open virtual machine:This virtual machine appears to be in use
- HOW TO: Change the Owner of a User-Defined Data Type That Is in Use in SQL Server 2000
- Spring-aop: Error Cannot convert value of type [$Proxy...] to required type
- Eclipse “cannot be resolved to a type” error