<!-- https://github.com/evanplaice/jquery-csv/raw/master/src/jquery.csv.js -->
<script src="jquery-csv.js"></script>
<!-- -->
$(document).ready(function () {
$.ajax({
type: "GET",
url: "/assets/data.csv",
dataType: "csv",
success: function (data) { processCsvData(data); }
});
});
function processCsvData(data) {
var rows = $.csv.toObjects(data);
var filenames = [];
$.each(rows, function (i, val) {
var filename = val.slug;
filenames.insert(filename + ".jpg");
});
console.log(filenames);
}