M
Mmcolli00 Mom
Can this be done with Ruby? (this may be a shot in the dark)
Say you have a text file with a lot of data and you want to group all of
your data by a specific value. Is there a way to code something in ruby
similar to a query that you would create using sql. Can this even be
done using Ruby? And if so, is there a library that you can refer me to?
If not, do you know any alternative ways? Thanks, MC
example of text:
auto, model
car, honda
truck, chevy
car, nissan
truck, toyota
truck, ford
how i'd like it to look:
car, honda, nissan,
truck, chevy, toyota, ford
Say you have a text file with a lot of data and you want to group all of
your data by a specific value. Is there a way to code something in ruby
similar to a query that you would create using sql. Can this even be
done using Ruby? And if so, is there a library that you can refer me to?
If not, do you know any alternative ways? Thanks, MC
example of text:
auto, model
car, honda
truck, chevy
car, nissan
truck, toyota
truck, ford
how i'd like it to look:
car, honda, nissan,
truck, chevy, toyota, ford