The following data is retrieved from the REST API:
[[5671, 204], [5673, 192], [5674, 120], [5683, 120], [5684, 192], [5685, 204]]
When using typeof in JavaScript on the above, it returns a string. To convert it to a multi-dimensional array:
<script type="text/javascript">
const Http = new XMLHttpRequest();
const url='/hello/get_pw_status';
Http.open("GET", url);
Http.send();
var resp;
Http.onreadystatechange = (e) => {
console.log(Http.responseText);
document.getElementById("demo").innerHTML =Http.responseText;
console.log(typeof Http.responseText);
var pw_data = [];
pw_data=Http.data;
console.log(pw_data);
}