Add support for CJ queries

:-)
these two `if ...any?` are unnecessary, if the array is empty then each simply won't do anything.