Typescript Change Last Element Of Array Json Jsonpath