Is there an easy way to sort of call something similar to the database In query?
Does "mystring" exist in ["string1","mystring","string2"] => would return true
Does "mystring" exist in ["string1","string2","string3"] => would return false
["string1","mystring","string2"].include? "mystring"
See: Enumerable#include?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With