Python Find Object In Array Javascript Push To Front Of Array