Php String Loop Through Json In Typescript