搜尋

首頁  >  問答  >  主體

javascript - 輸出結果問題描述所示,如何解析json(裡面value值是數組,數組裡面又有key/value)?

現用$('#message').text(result.words_result);來解析,出來的結果全是[object object]這種形式,真實的json輸入結果如下,請問該如何寫js解析?


  "words_result": [
    {"words": "百里奚第二社区卫生服务中心检验报告单(贾利桂)"},
    {"words": "生化检查"},
    {"words": "检查结果单位参考值"},
    {"words": "血红蛋白"},
    {"words": "几L"},
    {"words": "男(120~160)女(110~150)"},
    {"words": "红细胞数"},
    {"words": "4.8"},
    {"words": " T I"},
    {"words": "男(4.0~5.5)女(3.0~50)"},
    {"words": "白细胞数"},
    {"words": " g / l"},
    {"words": "10"},
    {"words": "中性粒细胞比值"},
    {"words": "淋巴细胞比值"},
    {"words": "血小板数"},
    {"words": "180"},
    {"words": " g / l"},
    {"words": "10030"},
    {"words": "「丙氨酸氨基转移酶1482"},
    {"words": " u /"},
    {"words": "0~40"},
    {"words": "天门冬氨酸氨基转移酶|32.17"},
    {"words": " u /"},
    {"words": "0~40"},
    {"words": "总蛋白"},
    {"words": "60~80"},
    {"words": "总胆红素"},
    {"words": "14.35"},
    {"words": "~20"},
    {"words": "尿素氮"},
    {"words": "4.592"},
    {"words": " mmol / l"},
    {"words": "7~714"},
    {"words": "肌酐"},
    {"words": "6798"},
    {"words": " mmol / l"},
    {"words": "44~97"},
    {"words": "甘油三酯"},
    {"words": "1.379"},
    {"words": "mmoL0.565-1895"},
    {"words": "总胆固醇"},
    {"words": "4685 mmol / l3:10-5.70"},
    {"words": "葡萄糖测定"},
    {"words": "4.469"},
    {"words": " mmol / l"},
    {"words": "3.9~6.1"},
    {"words": "心电图窦性心律"},
    {"words": "x线两肺清晰心膈正常"}
  ],
  "words_result_num": 49,
  "log_id": 2131283104
}
仅有的幸福仅有的幸福2754 天前573

全部回覆(3)我來回復

  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-05-18 10:56:58

    遍歷json,循環插入。

    回覆
    0
  • 大家讲道理

    大家讲道理2017-05-18 10:56:58

    雷雷

    回覆
    0
  • PHPz

    PHPz2017-05-18 10:56:58

    console.log(JSON.stringify(obj))

    回覆
    0
  • 取消回覆