去除数组中值的双引号
作者:互联网
//去除数组中值的双引号 for(var i = 0; i < points.length; i++){ var obj = points[i]; for(var prop in obj){ if(obj.hasOwnProperty(prop) && obj[prop] !== null && !isNaN(obj[prop])){ obj[prop] = +obj[prop]; } } } console.log(JSON.stringify(objects, null, 2));
标签:obj,双引号,prop,points,&&,去除,var,中值,null 来源: https://www.cnblogs.com/loveBetty/p/11548881.html