This message was deleted.
# ask-questions
w
This message was deleted.
f
Hi Melissa. Can you click the "advanced" mode when entering targeting conditions and see if it's parsing everything correctly into JSON?
f
Yes I tried that and it looks right to me. Here is a screenshot.
f
Hmm. What SDK are you using?
f
We’re using the React SDK
"@growthbook/growthbook-react": "^0.8.1",
f
Are the ids you are passing into the SDK strings or numbers?
f
They’re numbers
f
Ok, that's probably the issue then. In GrowthBook, under Settings -> Attributes, you can change the data type of id to be Number so it matches what you are passing into the SDK
After that, if you edit the rule and then save it, it should store the condition as this instead:
Copy code
{
  "id": {
    "$in": [
      762,
      2891
    ]
  }
}
f
Let me try that out! Thanks for your help!
Interesting that it works as a string when it’s just one user id with is equal to though
f
yeah, the javascript SDK must not be doing strict comparison for that operator. We should probably fix that
f
Thanks so much for the quick response though. Really liking Growthbook so far! 🙂
Changing the id type to number seems to be working - thanks!
145 Views