> For the complete documentation index, see [llms.txt](https://docs-embed.anyflow.jp/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-embed.anyflow.jp/solution-editor/actions/data-transform/list.md).

# リストアクション

## **概要**

リストは、`[1,2,3]`のようなリストを扱いやすくしたアクション郡を備えた標準コネクタです。

## **リストを作成** <a href="#create-list" id="create-list"></a>

空のリストを作成します。繰り返しアクションで、任意の数だけ繰り返す際に便利なアクションです。

### **入力フィールド**

| フィールド | 説明                                         |
| ----- | ------------------------------------------ |
| サイズ   | リストを作成するサイズです。5を入力した場合、5の長さをもったリストが作成されます。 |

### **アウトプット**

| フィールド | 説明                 |
| ----- | ------------------ |
| リスト   | 指定したサイズ分の長さをもったリスト |

## **リストの差分を抽出** <a href="#extract-list-diff" id="extract-list-diff"></a>

リスト同士の差分を抽出するアクションです。\
抽出対象のリストAと、比較対象のリストBを比較して、「抽出対象」にあって「比較対象」にないものを抽出します。

```
# 抽出対象
[{"a": 1}, {"b": 2}, {"c": 3}]

# 比較対象
[{"b": 2}]

# 結果
[{"a": 1}, {"c": 3}]
```

### **入力フィールド**

<table><thead><tr><th width="261.19921875">フィールド</th><th>説明</th></tr></thead><tbody><tr><td>抽出対象.リスト</td><td>抽出対象のオブジェクトのリストを指定します。</td></tr><tr><td>抽出対象.プロパティ変数定義</td><td>アウトプットに含めたいオブジェクトのプロパティを定義します。検索対象のオブジェクトに含まれていないプロパティを定義してもアウトプットは含まれません。</td></tr><tr><td>抽出対象.キー</td><td>「リスト」に指定したオブジェクトのうち、どのプロパティの値を比較対象にするのかを指定します。現時点では、オブジェクトや配列など、階層構造があるものには対応していません。</td></tr><tr><td>比較対象.リスト</td><td>比較対象のオブジェクトの配列を指定します。</td></tr><tr><td>比較対象.プロパティ変数定義</td><td>比較対象のオブジェクトのプロパティを定義します。このフィールドは「キー」を選択するためだけに使われるフィールドなので、アウトプットに影響はありません。</td></tr><tr><td>比較対象.キー</td><td>プロパティ変数定義で定義されたプロパティが選択できます。現時点では、オブジェクトや配列など、階層構造があるものには対応していません。</td></tr></tbody></table>

### **アウトプット**

| フィールド | 説明       |
| ----- | -------- |
| リスト   | 抽出されたリスト |

## **オブジェクトを検索** <a href="#search-object-list" id="search-object-list"></a>

リストに含まれているオブジェクトのキーを指定して検索するアクションです。

```
# リスト
[{"rank": "normal", "name": "田中太郎"}, {"rank": "gold", "name": "山田花子"}, {"rank": "gold", "name": "伊藤愛"}]

# 検索条件
[{"rank": "gold"}]

# 結果
[{"rank": "gold", "name": "山田花子"}, {"rank": "gold", "name": "伊藤愛"}]
```

### **入力フィールド**

| フィールド          | 説明                                                                         |
| -------------- | -------------------------------------------------------------------------- |
| 検索するオブジェクトのリスト | 検索対象のオブジェクトのリストを指定します。                                                     |
| プロパティ変数定義      | アウトプットに含めたいオブジェクトのプロパティを定義します。検索対象のオブジェクトに含まれていないプロパティを定義してもアウトプットは含まれません。 |
| 検索条件           | 検索したいキーと値を指定します。検索条件はAND条件です。                                              |
| 検索条件.キー        | プロパティ変数定義で定義されたプロパティが選択できます。現時点では、オブジェクトや配列など、階層構造があるものには対応していません。         |
| 検索条件.値         | 検索条件のキーで選択したキーの値を入力します。値は完全一致で比較されます。                                      |

### **アウトプット**

| フィールド | 説明       |
| ----- | -------- |
| リスト   | 検索されたリスト |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs-embed.anyflow.jp/solution-editor/actions/data-transform/list.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
