1

i am passing filter value but its always matches both field where i need optional matches for this

[ { "fieldName": "Firstname", "operator": "equals", "value": "Megh" }, { "fieldName": "Lastname", "operator": "contains",
"value": "doot" }]

Meghs Dhameliya
  • 2,406
  • 24
  • 29

1 Answers1

4
return $http ({
    method: 'GET',
    url: Backand.getApiUrl() + '/1/objects/users',
    params: {
      filter: {
        "q": { 
          { 
            "$or": [ { "firstName": { "$eq": "Megh" } }, { "lastName": {"$like": "doot"} } ]  
          }
        } 
      }
    }
  });

You can read further: http://docs.backand.com/en/latest/apidocs/nosql_query_language/

There is also the "search" parameter that performs a free text search on all the textual fields in the object. Useful when you want to provide a free text search in your UI.

return $http ({
        method: 'GET',
        url: Backand.getApiUrl() + '/1/objects/users',
        params: {
          search: "something"
        }
      });
relly
  • 439
  • 3
  • 3