【发布时间】:2009-07-15 21:58:36
【问题描述】:
我认为这是一个简单的问题,我以前从未像这样使用过 JSON。
很简单,我有一个 JSON 对象:
fc_json = {
"product_count": 1,
"total_price": 199.95,
"total_weight": 1,
"session_id": "26e8og4ldmlunj84uqf04l8l25",
"custom_fields":{
"affiliateID":"25"
},
"messages":{
"errors":[],
"warnings":[],
"info":[]
}
};
我想使用 jQuery 仅提取affiliateID 的变量。有没有一种简单的方法可以做到这一点?我真的不知道。
【问题讨论】: