suchen

Heim  >  Fragen und Antworten  >  Hauptteil

javascript - Wie wird JSON analysiert, wie in der Beschreibung des Ausgabeproblems gezeigt (der Wert ist ein Array und das Array hat einen Schlüssel/Wert)?

Mit $('#message').text(result.words_result);进行解析,出来的结果全是[object object]diesem Formular lautet das tatsächliche Ergebnis der JSON-Eingabe wie folgt.


  "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 Tage vor569

Antworte allen(3)Ich werde antworten

  • 曾经蜡笔没有小新

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

    遍历json,循环插入。

    Antwort
    0
  • 大家讲道理

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

    var obj = {"a": 1, "b": 2};
    
    alert(obj);
    alert(JSON.stringify(obj))

    Antwort
    0
  • PHPz

    PHPz2017-05-18 10:56:58

    console.log(JSON.stringify(obj))

    Antwort
    0
  • StornierenAntwort