# Modify values from grouped rows

Use the Modify values from grouped rows step to build complex hierarchical data and group data based on a hierarchical data field using path definitions on an ordered group of input rows. This step modifies hierarchical data to form nested JSON key-value pairs. It can also build complex data by nesting arrays, objects, and key-value pairs. The step takes non-hierarchical data and changes it to hierarchical data and sends it to other steps. See [Hierarchical data](/pdia-data-integration/10.2-data-integration/advanced-topics-pentaho-data-integration-overview/hierarchical-data.md) for an overview of hierarchical data in Pentaho.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pentaho.com/pdia-data-integration/10.2-data-integration/pdi-transformation-steps-reference-overview/modify-values-from-grouped-rows.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
