如何将字符串转换为多维数组?

时间:2014-09-30 07:24:51

标签: jquery vb.net

值以字符串形式传递:

Dim strInput as string  
strInput = "[{'Date':'2014-8','A':'561265.00','B':'6500.00'},{'Date':'2014-9','A':'14000.00','B':'459434.00'}]"

1 个答案:

答案 0 :(得分:0)

您可以通过将单引号替换为double来定义JSON对象,如下面的代码段

   var strInput = [{"Date":"2014-8","A":"561265.00","B":"6500.00"},{"Date":"2014-9","A":"14000.00","B":"459434.00"}];

并可以访问值

strInput[0].Date