js实现json数据行到列的转换
2012-12-24 16:17:17 来源:WEB开发网核心提示:assertEquals('23',month1['dfsoft-ppq']); assertEquals('29',month1['vcom-ppq']); assertEquals('33',month2['dfsoft-p
assertEquals('23',month1['dfsoft-ppq']);
assertEquals('29',month1['vcom-ppq']);
assertEquals('33',month2['dfsoft-ppq']);
assertEquals('34',month2['vcom-ppq']);
assertEquals('43',month3['dfsoft-ppq']);
assertEquals('48',month3['vcom-ppq']);
assertEquals('53',month4['dfsoft-ppq']);
assertEquals('52',month4['vcom-ppq']);
assertEquals('27',month1['dfsoft-spq']);
assertEquals('26',month1['vcom-spq']);
assertEquals('38',month2['dfsoft-spq']);
assertEquals('38',month2['vcom-spq']);
assertEquals('49',month3['dfsoft-spq']);
assertEquals('43',month3['vcom-spq']);
assertEquals('51',month4['dfsoft-spq']);
assertEquals('59',month4['vcom-spq']);
}
})
测试通过,表示转换成功。
assertEquals('29',month1['vcom-ppq']);
assertEquals('33',month2['dfsoft-ppq']);
assertEquals('34',month2['vcom-ppq']);
assertEquals('43',month3['dfsoft-ppq']);
assertEquals('48',month3['vcom-ppq']);
assertEquals('53',month4['dfsoft-ppq']);
assertEquals('52',month4['vcom-ppq']);
assertEquals('27',month1['dfsoft-spq']);
assertEquals('26',month1['vcom-spq']);
assertEquals('38',month2['dfsoft-spq']);
assertEquals('38',month2['vcom-spq']);
assertEquals('49',month3['dfsoft-spq']);
assertEquals('43',month3['vcom-spq']);
assertEquals('51',month4['dfsoft-spq']);
assertEquals('59',month4['vcom-spq']);
}
})
测试通过,表示转换成功。
更多精彩
赞助商链接