How would I get the name of an item from an array such as the one below, using an id? I have tried by using the .find function in javascript but it returns an undefined resp