189 8069 5689

jQuery访问json文件中数据的方法示例-创新互联

本文实例讲述了jQuery访问json文件中数据的方法。分享给大家供大家参考,具体如下:

从事重庆服务器托管,服务器租用,云主机,虚拟主机域名注册,CDN,网络代维等服务。

有时候我们可能需要用到json文件存储数据,然后通过前台语言直接进行访问。

首先是json文件:

{
 "管道": [
  {
  "ElementId": "标识号",
  "GISID": "GISID",
  "Label": "编号",
  "StartNodeID":"起始节点ID",
  "EndNodeID":"终止节点ID",
  "StartNodeLabel":"起始节点编号",
  "EndNodeLabel":"终止节点编号",
  "Physical_PipeDiameter":"管径",
  "Physical_PipeMaterialID":"管材",
  "Physical_HazenWilliamsC":"海曾威廉C值",
  "Physical_Length":"管长",
  "Physical_MinorLossCoefficient":"局部阻力系数",
  "Physical_InstallationYear":"铺设年代",
  "Physical_Address":"地址",
  "District":"营销公司",
  "DMA":"计量区",
  "Zone":"行政区",
  "flow":"当前流量",
  "velocity":"当前流速",
  "headloss":"当前水头损失"
  }],
 "节点": [{
  "ElementId": "标识号",
  "GISID": "GISID",
  "Label": "编号",
  "Physical_Elevation":"地面高程",
  "Physical_Depth":"埋深",
  "Physical_Address":"地址",
  "District":"营销公司",
  "DMA":"计量区",
  "Zone":"行政区",
  "hydraulicGrade":"水压标高",
  "pressure":"自由水压",
  "demand":"节点流量",
  "cl":"余氯浓度",
  "age":"水龄",
  "source":"供水水源"
 }],
 "阀门": [{
  "ElementId": "标识号",
  "GISID": "GISID",
  "Label": "编号",
  "Physical_Elevation":"地面高程",
  "Physical_Depth":"埋深",
  "Physical_Diameter":"口径",
  "Physical_Status":"阀门状态",
  "Physical_Address":"地址",
  "District":"营销公司",
  "DMA":"计量区",
  "Zone":"行政区",
  "Physical_InstallationYear":"安装年代"
 }],
 "水表": [{
  "DIAMETER":"口径",
  "CALIBER": "表径",
  "MATERIAL": "材质",
  "DEPTH":"埋深",
  "HEIGHT":"地面高程",
  "ADDR":"地址",
  "WATREGID": "表号",
  "USERNAME":"用户名",
  "JUNCTION":"接口类型",
  "DISTRICT":"行政区",
  "MEASUREIN":"营销公司",
  "FINISHDATE":"安装日期"
 }],
 "消火栓": [{
  "ElementId": "标识号",
  "GISID": "GISID",
  "Label": "编号",
  "Physical_Elevation":"地面高程",
  "Physical_Depth":"埋深",
  "Physical_Address":"地址",
  "District":"营销公司",
  "DMA":"计量区",
  "Zone":"行政区",
  "Physical_Diameter":"口径",
  "Physical_Type":"样式"
 }]
}

另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


当前标题:jQuery访问json文件中数据的方法示例-创新互联
本文URL:http://cdxtjz.cn/article/dpshdg.html

其他资讯