有人可以告诉我如何从以下JSON获取title
和href
属性吗?
{
"funding": [ {
"FIELD1": "1",
"FIELD2": "01/12/2016",
"FIELD3": "<a title=\"SidQam\" href=\"http://www.sidqam.com/\">SidQam</a>",
"FIELD4": "Technology",
"FIELD5": "Healthcare Software System",
"FIELD6": "Noida",
"FIELD7": "SQue Capital, Grace Capital Ventures, Soham Vencaps",
"FIELD8": "Private Equity",
"FIELD9": "1,200,000"
}
]
}
答案 0 :(得分:0)
JSONObject jsonObject = new JSONObject(jsonString);
JSONArray jsonArray = jsonObject.getJSONArray("funding");
String link = jsonArray.getString("FIELD3");
String href = link.substring(link.indexOf("http://"), link.indexOf("\">"));
//href must be clear link