Skip to content

Instantly share code, notes, and snippets.

@neumino
Created June 21, 2013 18:46
Show Gist options
  • Save neumino/5833389 to your computer and use it in GitHub Desktop.
Save neumino/5833389 to your computer and use it in GitHub Desktop.
For hazardous on IRC
r.table("table_name").filter( function(score) {
return score("scoreboard")("teamPlayerParticipantStats")("externalizedData").map( function(data) {
return data("summonerName")
}).contains("some_string")
.or(
score("scoreboard")("otherTeamPlayerParticipantStats")("externalizedData").map( function(data) {
return data("summonerName")
}).contains("some_string")
)
})
@neumino
Copy link
Author

neumino commented Jun 21, 2013

r.table("test").filter( function(score) {
    return score("scoreboard")("teamPlayerParticipantStats")("externalizedData").map( function(data) {
            return data("summonerName")
        }).coerceTo('array').contains("some_string")
    .or(
        score("scoreboard")("otherTeamPlayerParticipantStats")("externalizedData").map( function(data) {
            return data("summonerName")
        }).coerceTo('array').contains("some_string")
    )
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment