Created
October 29, 2014 16:57
-
-
Save foglabs/5c20169e178256285327 to your computer and use it in GitHub Desktop.
CSV Parsing Example For Chris
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@csvobjects = [] | |
CSV.foreach('example.csv', headers: true) do |row| | |
@csvobjects << row | |
end | |
result = @csvobjects.select { |k,v| k[:email] == "[email protected]" }.first | |
result[:name] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment