I have an API that returns the following JSON values as string.
"[
["West Baton Rouge test hello world", "1"],
["LSU Parking \u0026 Transportation Services", "2"],
["demokljafsk", "3"],
["latest", "19"],
["Hello check", "20"],
["Dinesh Devkota", "21"],
["World", "22"],
["altered value.", "23"],
["Dinesh Devkota", "24"],
["Dinesh Devkota", "25"],
["Dinesh Devkota", "26"],
["Dinesh Devkota", "27"],
["Dinesh Devkota", "28"],
["Rocking Client", "29"],
["West Baton Rouge", "30"],
["Test Client", "31"]
]"
I am having hard time trying to get the first value of each array with JQuery and log it into console with following code.
$.get("/controller", function (data) {
console.log("Data Loaded: " + data);
for (var eachdata in data) {
console.log(eachdata[0]);
}
});
I am new to JQUERY and wonder what is the right way.