library(jsonlite) library(data.table) library(ggplot2) init <- function() { j <<- fromJSON("cpubenchmark.json") d <<- j$data setDT(d) d[, price := as.numeric(gsub("[\\$,]", "", price))] dd <<- \() d[ grepl(s, name), ] }