See in R programming, if you want to grow the objects in a loop, then usually the process is very slow. You can use lapply/sapply instead.
all_data <- do.call(rbind, lapply(all_files, function(x) {
temp = jsonlite::fromJSON(file = x)
if(length(temp$tags))
list(tags = temp$tags, track_id = temp$track_id)
}))
If you want a more convenient one then you can sue purrr's map_df:
all_data <- map_df(all_files, ~{
temp = jsonlite::fromJSON(file = .x)
if(length(temp$tags))
list(tags = temp$tags, track_id = temp$track_id)
})