I’m having a hard type to fetch the itens on this many-to-many relation between Characters and Films, I get an Array, but it’s empty.
const relation_where_films = encodeURIComponent(JSON.stringify({
"characters":{
"__type": "Relation",
"className": "SWAPI_Character",
"objectId": get_data,
}
}));
(async () => {
const resp_films = await fetch(
`https://parseapi.back4app.com/classes/SWAPI_Film?&where=${relation_where_films}`,
{
headers: {
'X-Parse-Application-Id': 'API-ID',
'X-Parse-REST-API-Key': 'API-KEY',
}
}
);
const films = await resp_films.json();
var obj_films = films.results;
console.log(obj_films);
})();
I would really appreciate if somenone tell me what what is wrong, even a tip would come in handy.