Php Check If Key Exists In Array Of Objects In Typescript