//传入json数据及 key 返回对应的text json数据格式 [{key:'1',"text":'我是text'}]
function returntext(obj, key) {
if (key == undefined || key == "") return "";
var text = '';
for (var i = 0, len = obj.length; i < len; i++) {
if (obj[i].key == key) {
text = obj[i].text;
break;
}
}
return text;
}