var t=''; for(var i3=0;i3<=mydata.length;i3++){ t+='<a href="'+mydata['TOPIC_LINK'][i3]+'">'+mydata2['TOPIC_NAME'][i3]+'</a> ';}; $('#test').append(t);