码迷,mamicode.com
首页 > 编程语言 > 详细

后台数据转化为echarts的二维数组

时间:2019-10-21 16:34:22      阅读:568      评论:0      收藏:0      [点我收藏+]

标签:二维数组   天津   内蒙古   class   art   any   company   河南   海南   

{
let originData={
  "code": "000000",
  "message": "成功",
  "data": {
    "list": {
      "白宇飞区": [
        {
          "companyCode": "0679",
          "companyName": "重庆分",
          "purPrice": 110.25,
          "regionName": "白宇飞区",
          "regionCode": "R004"
        },
        {
          "companyCode": "0678",
          "companyName": "四川分",
          "purPrice": 100,
          "regionName": "白宇飞区",
          "regionCode": "R004"
        },
        {
          "companyCode": "0680",
          "companyName": "贵州分",
          "purPrice": 125.25,
          "regionName": "白宇飞区",
          "regionCode": "R004"
        },
        {
          "companyCode": "0676",
          "companyName": "云南分",
          "purPrice": 140.25,
          "regionName": "白宇飞区",
          "regionCode": "R004"
        }
      ],
      "于建平区": [
        {
          "companyCode": "0136",
          "companyName": "北京分",
          "purPrice": 120.55,
          "regionName": "于建平区",
          "regionCode": "R001"
        },
        {
          "companyCode": "0162",
          "companyName": "天津分",
          "purPrice": 110.25,
          "regionName": "于建平区",
          "regionCode": "R001"
        },
        {
          "companyCode": "0164",
          "companyName": "石家庄分",
          "purPrice": 110.25,
          "regionName": "于建平区",
          "regionCode": "R001"
        },
        {
          "companyCode": "0338",
          "companyName": "山西分",
          "purPrice": 78.5,
          "regionName": "于建平区",
          "regionCode": "R001"
        },
        {
          "companyCode": "0267",
          "companyName": "辽宁分",
          "purPrice": 135.25,
          "regionName": "于建平区",
          "regionCode": "R001"
        },
        {
          "companyCode": "0266",
          "companyName": "吉林分",
          "purPrice": 85.25,
          "regionName": "于建平区",
          "regionCode": "R001"
        },
        {
          "companyCode": "0265",
          "companyName": "黑龙江分",
          "purPrice": 90.25,
          "regionName": "于建平区",
          "regionCode": "R001"
        },
        {
          "companyCode": "0730",
          "companyName": "第二分",
          "purPrice": 110.25,
          "regionName": "于建平区",
          "regionCode": "R001"
        },
        {
          "companyCode": "0731",
          "companyName": "南京分",
          "purPrice": 65.25,
          "regionName": "于建平区",
          "regionCode": "R001"
        },
        {
          "companyCode": "0741",
          "companyName": "浙江分",
          "purPrice": 150.25,
          "regionName": "于建平区",
          "regionCode": "R001"
        },
        {
          "companyCode": "0470",
          "companyName": "山东分",
          "purPrice": 178.55,
          "regionName": "于建平区",
          "regionCode": "R001"
        },
        {
          "companyCode": "0852",
          "companyName": "广州分",
          "purPrice": 95.25,
          "regionName": "于建平区",
          "regionCode": "R001"
        }
      ],
      "周永顺区": [
        {
          "companyCode": "0851",
          "companyName": "江西分",
          "purPrice": 70,
          "regionName": "周永顺区",
          "regionCode": "R003"
        },
        {
          "companyCode": "0574",
          "companyName": "湖北分",
          "purPrice": 95.25,
          "regionName": "周永顺区",
          "regionCode": "R003"
        },
        {
          "companyCode": "0575",
          "companyName": "湖南分",
          "purPrice": 142.25,
          "regionName": "周永顺区",
          "regionCode": "R003"
        },
        {
          "companyCode": "0677",
          "companyName": "南宁分",
          "purPrice": 88.25,
          "regionName": "周永顺区",
          "regionCode": "R003"
        }
      ],
      "白善霖区": [
        {
          "companyCode": "0327",
          "companyName": "内蒙古分",
          "purPrice": 99.25,
          "regionName": "白善霖区",
          "regionCode": "R005"
        },
        {
          "companyCode": "0328",
          "companyName": "陕西分",
          "purPrice": 100,
          "regionName": "白善霖区",
          "regionCode": "R005"
        },
        {
          "companyCode": "0325",
          "companyName": "甘肃分",
          "purPrice": 120.25,
          "regionName": "白善霖区",
          "regionCode": "R005"
        },
        {
          "companyCode": "0326",
          "companyName": "新疆分",
          "purPrice": 88.25,
          "regionName": "白善霖区",
          "regionCode": "R005"
        }
      ],
      "霍尔峰区": [
        {
          "companyCode": "0471",
          "companyName": "安徽分",
          "purPrice": 135.25,
          "regionName": "霍尔峰区",
          "regionCode": "R002"
        },
        {
          "companyCode": "0849",
          "companyName": "福建分",
          "purPrice": 120.25,
          "regionName": "霍尔峰区",
          "regionCode": "R002"
        },
        {
          "companyCode": "0573",
          "companyName": "河南分",
          "purPrice": 80.25,
          "regionName": "霍尔峰区",
          "regionCode": "R002"
        },
        {
          "companyCode": "0850",
          "companyName": "海南分",
          "purPrice": 100,
          "regionName": "霍尔峰区",
          "regionCode": "R002"
        }
      ]
    },
    "purPrice": 100
  }
};



}

 

后台数据转化为echarts的二维数组

标签:二维数组   天津   内蒙古   class   art   any   company   河南   海南   

原文地址:https://www.cnblogs.com/qtx-/p/11714027.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!