Js如何拼装一个新的JSON格式的对象
var SchemaIpList = [];
SchemaIpList.push({envId:envListData.object[index].id, envName:envListData.object[index].name});
(SchemaIpList[index_j]).ips = envIpList[index_i].ips;
(SchemaIpList[index_j]).count = (envIpList[index_i].ips).length;
[
    {
        envId: 5390,
        envName: '日常环境(中心)',
        ips:[
            "10.101.83.128",
            "11.239.174.115"
        ],
        count: 2,
    },
    {
        envId: 31503,
        envName: '日常环境2',
        ips:[
            "100.69.199.151",
            "10.101.83.128"
        ],
        count: 2,
    },
]
 
                    
                
 
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号