以下是我从javascript收到的响应。我在寻找json string like ['stocks']['counter']
。如何删除变量定义var stockData = 'string'
。
var stockData = {
"Stocks":
[
{
"counter": "ALAM",
"open": "0.100",
"high": "0.105",
"low": "0.100",
"lastdone": "0.105",
"change": "0.005",
"volume": "8,033",
"percentchange": "5.00",
"stockcode": "5115"
}
]
};
谢谢 萨尔瓦(Sarwar)
答案 0 :(得分:0)
您忘记了字典索引
stockData['Stocks'][0]['counter']