Php Delete First Item From Array To Hashmap In Javascript