Skip to content

Instantly share code, notes, and snippets.

@foglabs
Created October 29, 2014 16:57
Show Gist options
  • Save foglabs/5c20169e178256285327 to your computer and use it in GitHub Desktop.
Save foglabs/5c20169e178256285327 to your computer and use it in GitHub Desktop.
CSV Parsing Example For Chris
@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