Bootstrap

JS 将扁平化数组转化为树形结构

后台返回数据如下:

			{
    AREA_NAME: "浙江省", level: 0, PID: 0, AREA_CODE: 330000 },
            {
    AREA_NAME: "杭州市", level: 1, PID: 330000, AREA_CODE: 330100 },
            {
    AREA_NAME: "宁波市", level: 1, PID: 330000, AREA_CODE: 330200 },
            {
    AREA_NAME: "温州市", level: 1, PID: 330000, AREA_CODE: 330300 },
            {
    AREA_NAME: "嘉兴市", level: 1, PID: 330000, AREA_CODE: 330400 },
            {
    AREA_NAME: "湖州市", level: 1, PID: 330000
;