如何使用jquery从json数组中获取json对象 [英] How to get json object from json array using jquery
本文介绍了如何使用jquery从json数组中获取json对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
[{ 结果: 真, isAdmin: 正确, CustomerCode: 02184, 企业编码: 1}]
我尝试过:
[{结果 :True,isAdmin:True,CustomerCode:02184,CompanyCode:1}]如何转换json对象
解决方案
< blockquote>检查一下:处理JSON中的对象数组,Javascript - rextester [ ^ ]
如果您想将其发送到REST Api
使用此波纹管功能将其更改为字符串
var objon = JSON.stringify([{Result:True,isAdmin:True, CustomerCode:02184,CompanyCode:1}]);
引用:如何使用jquery从json数组获取json对象
[{"Result":"True","isAdmin":"True","CustomerCode":"02184","CompanyCode":"1"}]
What I have tried:
[{"Result":"True","isAdmin":"True","CustomerCode":"02184","CompanyCode":"1"}] how to convert json object
解决方案
Check this out: Handling array of objects in JSON, Javascript - rextester[^]
If you would like to send it to a REST Api
change it to string using this the bellow function
var objon = JSON.stringify([{ "Result": "True", "isAdmin": "True", "CustomerCode": "02184", "CompanyCode": "1" }]);
Quote:How to get json object from json array using jquery
这篇关于如何使用jquery从json数组中获取json对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文