好了,我的代码从websocket中检索json,并且当前将所有json打印到控制台。我想要做的是将信息片段存储为变量。我怎么才能转身:
{
"type": "question",
"ts": "2018-06-30T00:05:53.685Z",
"totalTimeMs": 10000,
"timeLeftMs": 10000,
"questionId": 46220,
"question": "In wrestling, what term refers to pretending that scripted theatrics are totally real?",
"category": "Entertainment",
"answers": [{
"answerId": 140757,
"text": "Gas"
},
{
"answerId": 140758,
"text": "Kayfabe"
},
{
"answerId": 140759,
"text": "House show"
}
]进入:
Question = In wrestling, what term refers to pretending that scripted theatrics are totally real?
pAnswer1 = Gas
pAnswer2 = Kayfabe
pAnswer3 = House show我正在使用node。
https://stackoverflow.com/questions/52826080
复制相似问题