Streaming Availability

फ्रीमियम
Verified
द्वारा Movie of the Night | अपडेट किया गया 4 days ago | Movies
लोकप्रियता

9.9 / 10

लेटेंसी

597ms

सेवा का स्तर

100%

Health Check

N/A

सभी चर्चाओं पर वापस जाएं

Response (Javascript, Jquery) not an object?

Rapid account: Deya Liao
deya.liao
2 years ago

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 2 years ago

Thank you so much! That worked 😃

Rapid account: Cevatbarisyilmaz
cevatbarisyilmaz Commented 2 years ago

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 2 years ago

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 2 years ago

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

चर्चा में शामिल हों - नीचे टिप्पणी जोड़ें:

नई टिप्पणियाँ पोस्ट करने के लिए लॉग इन / साइनअप करें