Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use case of $pick not clear #29

Open
niccottrell opened this issue Nov 30, 2018 · 0 comments
Open

Use case of $pick not clear #29

niccottrell opened this issue Nov 30, 2018 · 0 comments

Comments

@niccottrell
Copy link

I'm a bit confused by the point of $pick. I have an example like:

"$pick": {
      "array": [
        "75009",
        "75010",
        "75008",
        "75011"
      ]
    }

and had assumed that by default it would pick an element at random, but it always picks element = 0. How can I randomize this and specify a value for element?

I guess I should be using $choose instead - but then I don't understand what the point of $pick is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant