Use Json.parse and add the values in a loop:
$(function() {
json = '{ "employees" : [' +
'{ "firstName":"John" , "lastName":"Doe" },' +
'{ "firstName":"Anna" , "lastName":"Smith" },' +
'{ "firstName":"Peter" , "lastName":"Jones" } ]}';
parsedJson= JSON.parse(json);
var otable = $("#datatable").dataTable();
//Forgot to clear the table first
otable.fnClearTable();
$.each(parsedJson.employees, function(key, value) {
otable.dataTable().fnAddData([
value.firstName,
value.lastName,
]);
})
});