convert returned rows to tripIds