Php Loop Through Object Array Typescript Vs Nodejs