If I understood well you want to fill each information
So to parse with javascript you can do :
var parsedResponse = JSON.parse(ajaxesponse);
if(parsedResponse.length = 0){
console.log('No data');
}else{
var keys = Object.keys(parsedResponse[0]);
//parsedResponse[0] for driver data
for(var i = 0; i < keys.length ; i++){
//The best thing to do is to change your class name and name it the same way as your keys in the response object
$("."+keys[i]).html(parsedResponse[0][keys[i]]);
}
}
And your html :
instead of
<div>
<label>Email:</label>
<span class="demail"></span>
</div>
You have something like that
<div>
<label>Email:</label>
<span class="email"></span>
</div>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…