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?
Doe mee aan de discussie - voeg hieronder een opmerking toe
Thank you so much! That worked ๐
Add the following line to the settings variable:
"dataType": "json",
This should make the returned response an object.
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.
Can you paste the code you are using here? (Make sure to remove your API key)