> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bringits.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Insert To Children By Query List

> Insert multiple fields into child objects using a list of query and field name pairs

The Insert To Children By Query List command (Command Type: 1021) inserts multiple fields into child objects by applying a list of query-and-field-name pairs. Each pair is applied in order to all children.

## Overview

The Insert To Children By Query List command provides functionality for:

* Inserting multiple fields into child objects in a single command
* Applying each query-field pair sequentially to all children
* Reducing pipeline complexity when multiple parent fields need to be injected

## Command Type

**Command Type ID:** 1021

## Parameters

| Parameter   | Type                                   | Description                                                                              | Required |
| ----------- | -------------------------------------- | ---------------------------------------------------------------------------------------- | -------- |
| **queries** | Array of InsertToChildrenByQueryParams | List of insert-to-children-by-query param objects, each applied in order to all children | Yes      |

### InsertToChildrenByQueryParams

| Field         | Type   | Description                                          | Required |
| ------------- | ------ | ---------------------------------------------------- | -------- |
| **fieldName** | string | The name of the field to insert the data into        | Yes      |
| **query**     | string | JSONPath query to select the data from commandResult | Yes      |

## Usage Examples

### Insert Multiple Parent Fields

```json theme={null}
{
  "command": "insert-to-children-by-query-list",
  "params": {
    "queries": [
      {
        "fieldName": "eventId",
        "query": "$.data.id"
      },
      {
        "fieldName": "sportId",
        "query": "$.data.sportId"
      },
      {
        "fieldName": "leagueId",
        "query": "$.data.leagueId"
      }
    ]
  }
}
```

### Insert Metadata and Timestamp

```json theme={null}
{
  "command": "insert-to-children-by-query-list",
  "params": {
    "queries": [
      {
        "fieldName": "source",
        "query": "$.data.provider"
      },
      {
        "fieldName": "collectedAt",
        "query": "$.data.timestamp"
      }
    ]
  }
}
```

## Common Use Cases

* **Bulk Enrichment**: Inject multiple parent-level identifiers into child records in one step
* **Data Denormalization**: Flatten hierarchical data with multiple parent attributes
* **Pipeline Simplification**: Replace multiple sequential Insert To Children By Query commands with one

## Related Commands

* [Insert To Children By Query](/stream/commands/parse/insert-to-children-by-query) - Insert a single field into children
* [Insert To Children](/stream/commands/parse/insert-to-children) - Insert parent attributes using key mapping rules
* [Key Mapping](/stream/commands/parse/key-mapping) - Remap fields after insertion
