Мне нужна помощь в доступе к данным из массива json ответа ajax.
Внутренний PHP-скрипт возвращает массив, например:
[
[
{
AccessID: "178638920205",
ActionDate: "2018-12-18 01:36:56",
ActionDescription: "Richard Mahdi logged out at 2018-12-18 01:36:56 AM.",
ActionType: "Log Out",
Record_Number: "6890701492",
ResponseLevel: "0",
custNames: "Richard Mahdi",
id: "9",
thumbNameClass: "qRichardS",
useThumbNail: "https://subdomain.domain.com/adminodocs2019001/richard686827.png"
}
],
[
{
AccessID: "178638920205",
ActionDate: "2018-12-18 01:35:32",
ActionDescription: "Richard Mahdi sent Feed Back. Feedback Type: Request. If Feedback is a complaint, you might want to address that immediately via direct communication. View Feedback message from Feedback Section",
ActionType: "Feed Back",
Record_Number: "6890701492",
ResponseLevel: "5",
custNames: "Richard Mahdi",
id: "8",
thumbNameClass: "gRichardB",
useThumbNail: "https://subdomain.domain.com/adminodocs2019001/richard686827.png"
}
],
[
{
AccessID: "178638920205",
ActionDate: "2018-12-18 01:33:25",
ActionDescription: "Richard Mahdi sent Feed Back. Feedback Type: Complaints. If Feedback is a complaint, you might want to address that immediately via direct communication. View Feedback message from Feedback Section",
ActionType: "Feed Back",
Record_Number: "6890701492",
ResponseLevel: "5",
custNames: "Richard Mahdi",
id: "7",
thumbNameClass: "fRichardU",
useThumbNail: "https://subdomain.domain.com/adminodocs2019001/richard686827.png"
}
],
[
{
AccessID: "178638920205",
ActionDate: "2018-12-18 01:32:27",
ActionDescription: "Richard Mahdi successfully completed Initial Account Setup. No action required.",
ActionType: "Initial Account Setup",
Record_Number: "6890701492",
ResponseLevel: "0",
custNames: "Richard Mahdi",
id: "6",
thumbNameClass: "tRichardD",
useThumbNail: "https://subdomain.domain.com/adminodocs2019001/richard686827.png"
}
]
]
Пробовал несколько способов обработки данных и доступа к элементам массива.,В настоящее время застрял с:
var datatosend = { 'adminoID': "12345"};
$.ajax({
url: "dtrack.php",
data: datatosend,
type: 'POST',
contentType: false,
processData: false,
dataType: "json",
cache: false,
success: function(response){
$.each(response,function(x,y){
console.log(y.ActionDescription);
alert(y.ActionDescription);
});
}
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
Благодарен за все предложения или решения.