Typescript Turn Array Of Objects In Php