file location Ex: http://localhost:8080/config/userlog.conf (file which having json data)
Below function is for read data from above file.
JSON Data in above file: {"datetime": "01/10/2018 16:33:20", "password": "password123", "username":"[email protected]"}
var getConfigData = function(filename) {
var data = {
conf: filename,
what: 'conf'
};
return $.ajax({
url: '/config/userlog.conf',
data: data,
global: false
});
};
var logData = getConfigData('userlog.conf');
console.log(logData); //output getting undefined
Question: how to read data from .conf file type