Sign In Register

How can we help you today?

Start a new topic

Json Parse (Cloud code or Collection Find)

Hi,


We have a collection of players.  I'm trying to write some helpful analytics for us to parse out things we're interested in.  For example, how many people have > X gold.


In the players collection, our record looks like this:

(omitted non-important info)


{
privateData: {
    playerData: " { "mName" : "New Profile", "mGold" : 56 } "
    }
}


Now, I cannot write a query like:

{"privateData": {"playerData" : {"mGold": 56}}}


It seems our player data is wrapped in a string (quotes).  Is there a way I can either query that data, to find players with exactly 56 gold?  AND is there a way to query something like... players with greater than 50 gold?


Thanks!

Login to post a comment