<commit_before>// Add your code here










//Placing at the bottom, adding the rest of the JS at top

$.getJSON( "http://mks-frontend-gallery.herokuapp.com/", function( json ) {
    console.log(json);
});<commit_msg>Added the example and review from class, need to focus on JSON this week to better understand.<commit_after>// Add your code here

$(document).ready(function(){
	var animals = [];
 
	$.getJSON( "https://mks-frontend-gallery.herokuapp.com/", function( json ) {
	  for (var i in json) {
	  	$(".gallery").append("<div class='large-4 small-6 columns " + json[i].animals.join(" ") + "'><img src=" + json[i].url + "></div>");
	  }
	  var ids = [];
	  $.each( json, function ( key, val ) {
	    
	    for (var x = 0; x < val.animals.length; x++) {
	    	ids.push(
	    		val.animals[x]
	    	);
	    }
 
	    $.unique(ids);
	  });
	  for (i in ids) {
	  	$(".filters").append("<div class='filter-button individual button active' id='" + ids[i] + "'>" + ids[i]+ "</div>");
	  }
	  console.log(ids);
	}).done(function(){
		console.log("done")
		$('.filter-button').click(function(){
			$(this).toggleClass("active");
			$("." + this.id).fadeToggle(1000, "swing", function(){console.log("fade is done")});
		});
	}).fail(function(){
		console.log("fail")
	});
 
	
});








//Placing at the bottom, adding the rest of the JS at top

//$.getJSON( "http://mks-frontend-gallery.herokuapp.com/", function( json ) {
//    console.log(json);
//});




{'fraction_non_alphanumeric': 0.21330589849108367, 'fraction_numerical': 0.004801097393689987, 'mean_word_length': 2.975476839237057, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 8, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5652720', 'n_tokens_mistral': 544, 'n_tokens_neox': 491, 'n_words': 123}