Typescript Change Last Element Of Array Json Jsonpath In Rest