Streaming Availability

부분 유료
Verified
분류별 Movie of the Night | 업데이트됨 il y a un jour | Movies
인기

9.9 / 10

지연 시간

588ms

서비스 수준

100%

Health Check

N/A

모든 토론으로 돌아가기

Response (Javascript, Jquery) not an object?

Rapid account: Deya Liao
deya.liao
il y a 2 ans

I ran the copied code to generate the API results; in doing so, the response I get is not an object––despite it supposedly being one. Thus, there is no way for me to access the keys/values conveniently. Am I doing something wrong?

Rapid account: Deya Liao
deya.liao Commented il y a 2 ans

Thank you so much! That worked 😃

Rapid account: Cevatbarisyilmaz
cevatbarisyilmaz Commented il y a 2 ans

Add the following line to the settings variable:

"dataType": "json",

This should make the returned response an object.

Rapid account: Deya Liao
deya.liao Commented il y a 2 ans

The code I’m using is follows:
const settings = {
“async”: true,
“crossDomain”: true,
“url”: “https://streaming-availability.p.rapidapi.com/search/basic?country=us&service=netflix&type=movie&genre=18&page=1&output_language=en&language=en”,
“method”: “GET”,
“headers”: {
“x-rapidapi-host”: “streaming-availability.p.rapidapi.com”,
“x-rapidapi-key”: “”
}
};

$.ajax(settings).done(function (response) {
console.log(response);
});
I’m trying to manipulate the response.

Rapid account: Cevatbarisyilmaz
cevatbarisyilmaz Commented il y a 2 ans

Can you paste the code you are using here? (Make sure to remove your API key)

아래에 의견을 추가하고 토론에 참여하세요.

새 댓글을 게시하려면 로그인 / 가입