I have below code for parse some json and make other things :
<!doctype html> <html> <head> <title>Parsing</title> <script type="text/javascript" src="jquery-2.1.0.min.js"></script> <link rel="stylesheet" href="css/index.css" type="text/css" /> </head> <script> $.getJSON( 'http://sath3g.altervista.org/index.php', { get_param: 'value' }, function(data) { // 'data' is an array of objects here for(var i=0; i<data.length; i++) { //data[i] is an individual line of excel data var lin = data[i]["Nr SAT"]; $('body').append($('<p>').html('Numero Sat: '+ '<a href = http://sath3g.altervsta.org/jsonint.html+?id='+lin '>'+ data[i]["Nr SAT"]+ '</a>')); $('body').append($('<p>').html('Data: '+ data[i]["Data"])); //http://sath3g.altervsta.org/jsonint.html +?id=+lin } }); </script> <body> <header> </header> </body> </html> In the line of code below, I want to put in the link using variable lin. But it doesn't work.
$('body').append($('<p>').html('Numero Sat: '+ '<a href =http://sath3g.altervsta.org/jsonint.html+?id='+lin '>'+ data[i]["Nr SAT"]+ '</a>')); What is wrong here?