gpt4 book ai didi

c# - 从 json 格式对象获取值

转载 作者:行者123 更新时间:2023-12-02 19:26:32 25 4
gpt4 key购买 nike

在我的 asp.Net 应用程序 (MVC 3) 中的 View 中,我正在使用一些 jquery 控件。我得到了 json

 {  
"text":"Books",
"state":"open",
"attributes":{
"url":"/demo/book/abc",
"price":100
}

如何获取属性值?

最佳答案

我认为你需要

var json =  {   
"text":"Books",
"state":"open",
"attributes":{
"url":"/demo/book/abc",
"price":100
}

json.attributes.url

例如。

关于c# - 从 json 格式对象获取值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11984845/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com