# Filter JSON Keys

This activity filters the user-specified JSON string to include or exclude the specified keys with the names in the specified data table input.

### Input

* **Input:** [`String Argument`](https://docs.visualyze.ai/getting-started/rpa-studio/arguments#types-of-arguments) <mark style="color:red;">`Required`</mark>\
  Specifies the input JSON string.<br>
* **Include Keys:** [`Boolean Argument`](https://docs.visualyze.ai/getting-started/rpa-studio/arguments#types-of-arguments) <mark style="color:red;">`Required`</mark>\
  Specifies whether to include or exclude keys.<br>
  * `True` - Filters the JSON input to include keys with the names in the input data table.
  * `False` - Filters the JSON input to exclude keys with the names in the input data table.<br>
* **Filter:** [`DataTable Variable`](https://docs.visualyze.ai/getting-started/rpa-studio/variables/activity-variables#datatable) <mark style="color:red;">`Required`</mark>\
  Specifies the **Datatable** input that is used to filter the given JSON Array. The data table used for filtering must contain key inputs based on which the JSON Array is to be filtered.

![The DataTable containing the keys for filtering the JSON Array.](https://1935494318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M927xRZSEM57y2sBcm3%2Fuploads%2FEUs6hSlAFhcm3Ysi0l8a%2Fimage.png?alt=media\&token=0272bb88-82ab-404e-ba4c-f4751ec066f2)

* **Key Column Name:** [`String Argument`](https://docs.visualyze.ai/getting-started/rpa-studio/arguments#types-of-arguments) <mark style="color:red;">`Required`</mark>\
  Specifies the column name of the data table used in the **Filter** property that indicates the **Keys** of the key-value pair to filter the JSON input.

### Output

* **Result:** [`String Variable`](https://docs.visualyze.ai/getting-started/rpa-studio/variables/user-defined-variables-1#string)\
  Specifies the filtered variable.


---

# 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.visualyze.ai/rpa-studio/file/json/filter-json-keys.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.
