问题补充说明:{"wegInstLt":[{"billTypeCode":"0","channelId":530,"channelKind":"03","isHaveBillDate":"0","isHavePayAmount":"0","isLeePay":"0","isPrePay":"1","wiliCode":"1238","wiliItem":"00","wiliName":"哈尔滨市自来水公司","wltiId":10345}]},求解答。
JSON是一种轻量级数据交换格式。json简单说就是js中的对象和数组,所以这两种结构就是对象和数组2种结构,你用的数据格式就是对象和数组的复合结构。
你的示例JS括显政断外流敌书ON数据是名/值对,其中只有一个"wegInstLt"的变量名,值是包含一个条目的数组。假设varinfo={"wegInstLt":[{"billTypeCode":"0","channelId":530,"channelKin顾d":"03","isHaveBillDate":"0","isHavePayAmou来自nt":"0","i360问答sLeePay":"0"委验外司星福,"isPrePay":"1","wiliCode":"1238","wiliItem":"00","wiliName":"哈尔滨市自来水公司","wl维处降列大木随后色tiId":10345}]};要获得"哈尔滨市自来水公司"可以这样写:
info.wegInstLt[0].wiliName
希望可以帮到你,祝你生活愉快!
标签:数据格式,JSON,这样