const selectedAnimals = ['lion','tiger','elephant','deer','bird','turtle']
const zoo = [{id: '1', name:'lion'},{id: '2', name:'panda'},{id: '3', name:'tiger'},{id: '4', name:'rabbit'},{id: '5', name:'bear'},{id: '6', name:'elephant'},{id: '7', name:'deer'},{id: '8', name:'bird'},{id: '9', name:'turtle'}]
Hi! There are two different arrays and I want to compare two arrays and find the id of selected animals from the zoo. How do I get the array of ids? Also, the id has to be a string. Thank you