You can use Flows Query Language (FQL) to transform one JSON object into another, differently structured, JSON object. This topic provides example FQL expressions that show different ways of structuring the JSON output of an Evaluate block in Postman Flows.
To try out the examples, add a Record input to the Start block in your flow. Connect an Evaluate block to the Start block. In the Evaluate block’s dropdown menu, select FQL. Paste an example FQL expression into the Evaluate block. Then create a scenario and paste the following example JSON into the scenario field that corresponds to your Start block’s input.
{ "name": "John Smith", "physical_address": { "street": "123 Park Avenue", "city": "Atlanta", "state": "GA", "zip": "12345" }, "work_address": { "street": "583 W. Island Drive", "city": "Miami", "state": "FL", "zip": "44456" }, "mailing_address": { "street": "232 Ravensburg Road", "city": "Durham", "state": "NC", "zip": "03948" }, "phones": [ { "type": "Home", "number": "123-456-7890" }, { "type": "Cell", "number": "098-765-4321" }, { "type": "Cell", "number": "888-777-5555" }, { "type": "work", "number": "314-265-9078" } ] }
When you run the flow, the expression will operate on the example JSON and the Evaluate block will output the result.
To return an array containing three of the top-level objects in the example JSON, use the following expression:
value1.[physical_address, work_address, mailing_address]
Expected result |
[ {"street": "123 Park Avenue","city": "Atlanta","state": "GA","zip": "12345"}, {"street": "583 W. Island Drive","city": "Miami","state": "FL","zip": "44456" }, {"street": "232 Ravensburg Road","city": "Durham","state": "NC","zip": "03948"} ] |
To return an array containing only the values of the city
key from the three top-level address
objects in the example JSON, use the following expression:
value1.[physical_address, work_address, mailing_address].city
Expected result | ["Atlanta","Miami","Durham"] |
FQL can return an array of key-value pairs composed of values from an object. To get the values of the type
and number
keys from objects in the phones
array and return them as an array of key-value pairs, use the following expression:
value1.phones.{type: number}
Expected result |
[ {"Home": "123-456-7890"}, {"Cell": "098-765-4321"}, {"Cell": "888-777-5555"}, {"work": "314-265-9078"} ] |
FQL can return an array that groups the values of a given key that’s present in multiple input objects. To group the values of Cell
keys from two different objects in the phones
array, use the following expression:
value1.phones{type: number[]}
Expected result |
{ "Home": ["123-456-7890"], "Cell": ["098-765-4321","888-777-5555"], "work": ["314-265-9078"] } |
Last modified: 2025/10/21