Request with boolean, no reconize

Hi, I’ve a GET request

and [active] is a boolean field. This fiels (and other boolean filed) is not reconize.
I am forced to change the string type to boolean (beforeFind).

Do you have another solution ?

The Request in beforeFind :
ParseQuery {
className: ‘Member’,
_where: { active: ‘true’ },
_include: [ ‘relations.member’ ],
_exclude: [ ‘__type’ ],
_count: false,
_limit: 20,
_skip: 0,
_readPreference: null,
_includeReadPreference: null,
_subqueryReadPreference: null,
_queriesLocalDatastore: false,
_localDatastorePinName: null,
_extraOptions: { excludeKeys: ‘__type’ },
_xhrRequest: { task: null, onchange: [Function: onchange] },
_order: [ ‘lastName’ ]

Thank you

You should encode where parameters for part of the query code. For example, if you want to filter active: true, you should encode this part.


var whereObject = {
  "active": true

var whereString = JSON.stringify(whereObject);
var whereEncoded = encodeURIComponent(whereString);

console.log(whereEncoded); //=> %7B%22active%22%3Atrue%7D

You should send request like this.

var url = "/api/classes/Member?where=" + whereEncoded + "&order=lastName&count=1&limit=20&skip=0&excludeKeys[]=__type&include=relations.member";

or you know:

filter active true products...

Thank you rgunindi, I use Axios and I find the problem → I just stringify the whereobject !
const whereString = JSON.stringify(whereObject); → only