Php Find Object In Array Javascript Methods For Objects