I\'m using mongolite package to connect and retrieve data from MongoDB.How to pass value in mongolite find query
##connecting mongodb library(mongolite) m
Given your i is a variable, you need to create the string using something like paste0:
i
paste0
values <- mongo$find(paste0('{"field" : ', i, '}') )
but rather than a loop you could also use
values <- mongo$find('{"field" : { "$in" : [ "process", "check", "queue" ] } }')