Angular Typescript Map Array Function In Php