You can get the number of players with private data bysupplying a query in the 'Count' tab:
{"privateData":{$gt:{}}}
Try this out and let us know how it works for you.
Regards,
Vinnie
s
sotiris gyftopoulos
said
about 6 years ago
Hello Vinnie! That work like a charm, Thanks a lot!
can you provide some info on the whole $gt and how that provide the result i needed?
Customer Support
said
about 6 years ago
Sure. The greater than operator works in this case because mongo's sort order will place empty objects before non-empty ones. You could also use the not equal operator:
{"privateData":{$ne:{}}}
which would work for this field, but in general $gt is more accurate as $ne will also return documents where the value has been set to null.
Regards,
Vinnie
S
Sergii Taraban
said
over 5 years ago
Not working for me.
I get "Error parsing JSON. Please use valid JSON, including double-quotes on object keys."
I was trying {"email":{$ne:{}}} and {"email":{$ne:null}}
That I am doing wrong?
R
Ryan Fuller
said
over 5 years ago
Sergi you have to put even the '$ne' in quotes. Only valid JSON works, and since it's not in quotes, it's not a string or any other valid JSON type (like number/array/object)
sotiris gyftopoulos
Hello To all!
i am trying to find a way to do a noSql Query to find the sum of the players that have private data.
Any ideas?
Thanks in advance!
Hi Sotiris,
You can get the number of players with private data bysupplying a query in the 'Count' tab:
{"privateData":{$gt:{}}}
Try this out and let us know how it works for you.
Regards,
Vinnie
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstCustomer Support
Hi Sotiris,
You can get the number of players with private data bysupplying a query in the 'Count' tab:
{"privateData":{$gt:{}}}
Try this out and let us know how it works for you.
Regards,
Vinnie
sotiris gyftopoulos
Hello Vinnie!
That work like a charm, Thanks a lot!
can you provide some info on the whole $gt and how that provide the result i needed?
Customer Support
Sure. The greater than operator works in this case because mongo's sort order will place empty objects before non-empty ones. You could also use the not equal operator:
{"privateData":{$ne:{}}}
which would work for this field, but in general $gt is more accurate as $ne will also return documents where the value has been set to null.
Regards,
Vinnie
Sergii Taraban
Not working for me.
I get "Error parsing JSON. Please use valid JSON, including double-quotes on object keys."
I was trying {"email":{$ne:{}}} and {"email":{$ne:null}}
That I am doing wrong?
Ryan Fuller
Sergi you have to put even the '$ne' in quotes. Only valid JSON works, and since it's not in quotes, it's not a string or any other valid JSON type (like number/array/object)
-
Documentation Notes
-
Design issues with user events
-
Using NoSQL
-
Runtime Collections vs Metadata Collections
-
Anonymous authentication from browser app
-
Modules
-
Movement With Unity
-
Problem with url parameters for downloadables
-
Querying NoSql GameSparks database
-
Challenge accesType
See all 2487 topics