javascript: parse JSON

$.get(“/intra/do/sequence_has_codonList.pl”,function(data){
data = JSON.parse(data); // array of objects
for(var i = 0, n = data.length; i<n; i++) {
for(var j = 0, codons = data[i].codons, m = codons.length; j<m; j++) {
if (codons[j] !== 0 ) {
var aa = codons[j].toUpperCase(), bb = data[i].abbr.toUpperCase(), cc = data[i].full;
codonIMap[aa] = bb;
codonFMap[aa] = cc;
// cannot be indexed, I don't know why.
}
}
}
});
上一篇:GIT入门笔记(8)-- 查看历史提交记录/根据版本号回到过去或未来


下一篇:OD: Peimei & Versioning Analysis