I'm calling a web api that returns a multi part HTTP response.
In the form of
...possible other content...
--97b6f48d-7f7e-4e96-bd0b-ced047222460
Content-Type: application/json; charset=utf-8
{"key":"this is the JSON"}
--97b6f48d-7f7e-4e96-bd0b-ced047222460--
...possible other content...
I want just the JSON: {"key":"this is the JSON"}
.
The GUID 97b6f48d-7f7e-4e96-bd0b-ced047222460
is a boundary identifier, identifying that part of the http response, randomly generated.
I know that there is only one part of the response that has JSON content. What is the best way for me to extract it?
FYI I'm using scripting in postman, so it will need to be javascript.