【发布时间】:2017-02-05 06:35:21
【问题描述】:
我在 JSON 对象中有以下格式的数据:
[{"Feature 1 Name":111,"Feature 2":111,"Feature 3":"stringforfeature3"}]
我已经开始编写一些代码来从 API 中提取信息,但不确定如何从 JSON 对象中提取信息(例如,如果我以某种方式调用“Feature 3”,则为“stringforfeature3”)。
ajax: {
type: "GET",
url: '/api/apiname/info/moreinfo', //where i'm pulling info from
dataType: "JSON",
success: function(data, textStatus, jqXHR) {
return {
title: // Where I'd like to use the extracted information
};
}
},
任何建议将不胜感激!
【问题讨论】:
标签: javascript jquery json ajax api-design