Jquery数据类型之间的转换

1、将对象转成JSON字符串

  JSON.stringify()

2、把一个json字符串解析成对象

  JSON.parse()

3、对数组操作 push() 、unshift()

   push() :加到数组最后

  unshift():加到数组最前面

4、查看数据类型

  typeof()

  console.info(typeof(this.roleData));

posted @ 2020-03-12 09:23  Barry_Song  阅读(1914)  评论(0编辑  收藏  举报