Try:
for ( i = 0; i < jsondata.geonames.length; i++) {
var cid = jsondata.geonames[i].countryId;
var name = jsondata.geonames[i].lng;
tx.executeSql('INSERT INTO countries (countryId,countryname) VALUES ("' + cid + '","' + name + '")');
}
Change the
<=
into
<
Hope this helps.