Python Find Object In Array Javascript Function