本文介绍了在Java脚本中读取JSON字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用页面方法从Java脚本中调用服务器方法,并且服务器方法返回JSON字符串(结果),如下所示
Hi,
I called server method from java script using page methods, and the server method return JSON String (result) like this
{"errorString":not found ,"obj":[[{"VideoId":1,"VideoName":"C sharp ","WebSite":"You tube","VideoLink":"www.youtube.com","Description":"This is C Sharp Tutorial"},{"VideoId":2,"VideoName":"VB .net","WebSite":"You tube","VideoLink":"www.youtube.com","Description":"This is VB.net Tutorial"}]]}
请让我知道如何在Java脚本中读取此json字符串.
我正在尝试这样阅读
警报(result.errorString)
警报(result.obj [0] .VideoId)
但我没有得到
在此先感谢
Please let me know how to read this json string in java script.
I am trying to read like this
alert(result.errorString)
alert(result.obj[0].VideoId)
but I am not getting
Thanks in advance
推荐答案
br/>
这篇关于在Java脚本中读取JSON字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!