This script does not work as it does not recognize $JsonString as a valid Json format. I suspect this is because of the usage of JsonEscape. Any ideas how I can get the Json string in a format that can be converted into a json object?
Are you trying to use that JSON blob on a Powershell script step, or someplace else? Cause I can see you are using both Powershell and Octostache (#{each}) syntax there.