# Return structured data in FQL You can use [Flows Query Language](/docs/postman-flows/flows-query-language/introduction-to-fql/) (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](/docs/postman-flows/reference/blocks/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. Click to view example JSON ```json { "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. ## Return multiple objects as an array To return an array containing three of the top-level objects in the example JSON, use the following expression: ```json value1.[physical_address, work_address, mailing_address] ```
Expected result ```json [ {"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"} ] ```
## Return an array of a single field from multiple objects 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: ```json value1.[physical_address, work_address, mailing_address].city ```
Expected result ```json ["Atlanta","Miami","Durham"] ```
## Collapse multiple objects into a single key-value pair 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: ```json value1.phones.{type: number} ```
Expected result ```json [ {"Home": "123-456-7890"}, {"Cell": "098-765-4321"}, {"Cell": "888-777-5555"}, {"work": "314-265-9078"} ] ```
## Collapse and group results by a shared field value 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: ```json value1.phones{type: number[]} ```
Expected result ```json { "Home": ["123-456-7890"], "Cell": ["098-765-4321","888-777-5555"], "work": ["314-265-9078"] } ```