{"id":19,"date":"2014-06-04T16:53:10","date_gmt":"2014-06-04T16:53:10","guid":{"rendered":"https:\/\/www.lianeallen.com\/home\/?p=19"},"modified":"2014-06-06T17:00:39","modified_gmt":"2014-06-06T17:00:39","slug":"magical-kingdom-of-csv-wonder","status":"publish","type":"post","link":"https:\/\/www.lianeallen.com\/home\/2014\/06\/magical-kingdom-of-csv-wonder\/","title":{"rendered":"Magical Kingdom of CSV Wonder"},"content":{"rendered":"<p>Since working with CSV files (comma separated values) is so common, Ruby has a whole library of methods designed just for that purpose. <\/p>\n<p>Require the csv library at the top of your file to get access to this magical kingdom of wonder:<\/p>\n<p>require &#8220;csv&#8221;<\/p>\n<p>Then you can call built-in methods, instead of rolling your own. Here&#8217;s one that iterates over each item in a csv file:<\/p>\n<p>CSV.foreach(filename, some_optional_stuff)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Since working with CSV files (comma separated values) is so common, Ruby has a whole library of methods designed just for that purpose. Require the csv library at the top of your file to get access to this magical kingdom of wonder: require &#8220;csv&#8221; Then you can call built-in methods, instead of rolling your own. &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.lianeallen.com\/home\/2014\/06\/magical-kingdom-of-csv-wonder\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Magical Kingdom of CSV Wonder&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-19","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.lianeallen.com\/home\/wp-json\/wp\/v2\/posts\/19","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lianeallen.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lianeallen.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lianeallen.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lianeallen.com\/home\/wp-json\/wp\/v2\/comments?post=19"}],"version-history":[{"count":1,"href":"https:\/\/www.lianeallen.com\/home\/wp-json\/wp\/v2\/posts\/19\/revisions"}],"predecessor-version":[{"id":20,"href":"https:\/\/www.lianeallen.com\/home\/wp-json\/wp\/v2\/posts\/19\/revisions\/20"}],"wp:attachment":[{"href":"https:\/\/www.lianeallen.com\/home\/wp-json\/wp\/v2\/media?parent=19"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lianeallen.com\/home\/wp-json\/wp\/v2\/categories?post=19"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lianeallen.com\/home\/wp-json\/wp\/v2\/tags?post=19"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}