I want to fetch all cities with the country names?
Something like this should do what you need:
(async () => {
const response = await fetch(
'https://parseapi.back4app.com/classes/City?limit=10&include=country&keys=name,country,country.name,population,location,cityId,adminCode',
{
headers: {
'X-Parse-Application-Id': 'mxsebv4KoWIGkRntXwyzg6c6DhKWQuit8Ry9sHja', // This is the fake app's application id
'X-Parse-Master-Key': 'TpO0j3lG2PmEVMXlKYQACoOXKQrL3lwM0HwR9dbH', // This is the fake app's readonly master key
}
}
);
const data = await response.json(); // Here you have the data that you need
console.log(JSON.stringify(data, null, 2));
})();