-
-
Save jcuffe/b42cb2846b07a65b207ed2985863ac24 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
$(document).ready(function(e){ | |
//commID = getCommunity(); | |
commID = "ACH"; | |
var campusArray = ilHeadshots.filter(function(item){ | |
return item.community == commID; | |
}); | |
console.log(ilHeadshots); | |
console.log(""); | |
console.log(campusArray); | |
// Start out with a forEach on the outer array | |
campusArray.forEach(function(item) { | |
// Convert the `images` dictionary to an array with Object.entries() | |
Object.entries(item["images"]).forEach(([key, value]) => { | |
$('#ff_imgHeadShot').append( | |
$('<option></option>').val(value).html(value) | |
); | |
}); | |
}); | |
//$('select#ff_imgHeadShot option').trigger("chosen:updated"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment