After making an ajax call, the json object that gets returned looks like this:
Object {0: "1", 1: "jake", 2: "#00ff00", tip_id: "1", tip_details: "jake", tip_color: "#00ff00"}
Object {0: "2", 1: "jakee", 2: "#00ff00", tip_id: "2", tip_details: "jakee", tip_color: "#00ff00"}
Object {0: "3", 1: "jakeee", 2: "#00ff00", tip_id: "3", tip_details: "jakeee", tip_color: "#00ff00"}
I attempted to access some values using the following approach:
for(var i=0;i<=response.length-1;i++){
console.log(response[i][1]); //the expected output is: jake,jakee,jakeeee
}
Another way I tried was:
for(var i=0;i<=response.length-1;i++){
console.log(response[i].tip_details); //the expected output is: jake,jakee,jakeeee
}
However, I am having trouble retrieving these values and I'm not sure why. Is there something I might be missing?