I am facing an issue with my function that retrieves my friends' ids. It works for all friend ids but I can't seem to make it work for just one friend's id. I believe I need to implement a loop to fetch all friend ids.
Could you provide assistance in fixing this code?
function(response) {
console.log(response);
var testdiv = document.getElementById("test");
testdiv.innerHTML = (
response[0].uid2
);
}