jsonrestformatpostmanpostman-collection-runner

How to auto-format values in Postman Bulk Edit feature?


I have a request responding with JSON data that I need to export as Body (form-data) for another request.

When copy pasting the response of the first request to the body of the second request in Bulk Edit, data is always JSON formatted, with trailing spaces, double-quotes, commas, etc. Therefore, when converting to Key-values, there are always characters that interfere with the request.

As such, I have to manually format all fields of the request for Postman to properly understand that I don't want spaces and double-quotes in the body of my request.

What I have:

{
  "key1": "value1",
  "key2": "value2",
  ...
  "keyn": "valuen"
}

How Postman interprets it:

|"key1"|."value1",|
|"key2"|."value2",|
...
|"keyn"|."valuen"|

What I need:

key1: value1
key2: value2
...
keyn: valuen

I have seen that there is an option "Trim keys and values in request body" but it doesn't seem to fix my issue.

I can't use variables because I need to manually edit some fields for tests purposes.

Is there a way to properly auto-format JSON text to Key-values format, or at least auto-import JSON data to the body of a request?


Solution

  • The answer was removed, but the solution was to: