ropensci / jqr

R interface to jq
https://docs.ropensci.org/jqr
Other
143 stars 13 forks source link

DSL `select` doesn't handle operators other than assignment `=` #65

Closed sckott closed 6 years ago

sckott commented 6 years ago

e.g.,

'[{"foo": 5, "bar": 7}, {"foo": 4, "bar": 7}]' %>% index() %>% select(.foo == 4)
#> Error: jq: error: syntax error, unexpected '(', expecting '}' (Unix shell quoting issues?) at <top-level>, line 1:
#> .[] | {c("==", ".foo", "4")}

so we're clearly not treating the == as we should - see logic in do() method