I have the following json-object returned via response
the function
function getUserList() {
$.ajax({
url: "https://reqres.in/api/users",
type: "POST",
data: {
name: "paul rudd",
movies: ["I Love You Man", "Role Models"]
},
success: function(response){
console.log(response); // prints the object
}
});
}
My question is how the movies-array are accessed in javascript? I cannot access it via response - if I do i get "undefined" returned.
i.e response.movies
undefined
or response.movies[0]
uncaught typerror cannot read property [0] of undefined
