The Database Hub | Back4App
The Database Hub | Back4App
How it works
  • Log In
  • Sign Up

  1. Back4App
  2. World Continents, Countries, and Cities
Public

1210
5630
1210
5630
  • DatabaseDatabase
  • GraphQL API PlaygroundAPI Playground
  • Get Started GuideGet Started
  • IssuesIssues
  • ContributorsContributors
  • Database
    Database
    GraphQL API Playground
    API Playground
    Get Started Guide
    Get Started
    Contributors
    Contributors

  1. IssueOpen
  2. known city name not returned via rgex

New IssueNew

joseph.szili commented this issue on Sep 2020

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>
pirsa.service commented this issue on Feb 2021
(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)); })();
adavimacedo commented this issue on Feb 2021

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>
Please enter a comment for this issue.