Brisbane, Australia is not returned but is listed in the cities data (page 13 approx)
<html>
<head></head>
<body>
<script type="text/javascript">
(async () => {
const where = encodeURIComponent(JSON.stringify({
"name": {
"$regex": "/brisbane/i"
}
}));
const response = await fetch(
`https://parseapi.back4app.com/classes/City?limit=10&order=country&where=${where}`,
{
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));
})();
</script>
</body>
</html>
(async () => {
const where = encodeURIComponent(JSON.stringify({
"name": {
"$regex": "(?i)brisbane"
}
}));
const response = await fetch(
`https://parseapi.back4app.com/classes/City?limit=10&order=country&where=${where}`,
{
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));
})();
Could you please try with the following code?
<html>
<head></head>
<body>
<script type="text/javascript">
(async () => {
const where = encodeURIComponent(JSON.stringify({
"name": {
"$regex": "brisbane",
"$options": "i"
}
}));
const response = await fetch(
`https://parseapi.back4app.com/classes/City?limit=10&order=country&where=${where}`,
{
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));
})();
</script>
</body>
</html>