# Array JSON Mask (ArrayJsonMaskGenerator)

The [Array JSON Mask](/app/generation/generators/generator-reference/array-json-mask.md) generator is a composite generator. It is a version of the JSON Mask generator that can be used for array values. It runs a selected generator on values that match a specified JSONPath.

## Link object structure <a href="#generator-api-array-json-mask-link-object" id="generator-api-array-json-mask-link-object"></a>

For the Array JSON Mask generator, you provide a link object for each sub-generator configuration.

The generator does not itself support consistency or differential privacy.

The `metadata` object is populated from the [`JsonMaskMetadata`](https://app.tonic.ai/apidocs/index.html#/models/JsonMaskMetadata) object. For the Array JSON Mask generator, `metadata` includes:

* `pathExpression`, which is the path expression that identifies the value to apply the sub-generator to.
* The types of values to apply the sub-generator to.
* The `subGeneratorMetadata` object, which identifies and configures the sub-generator.

Here is the basic structure of a link object for an Array JSON Mask sub-generator.

{% code overflow="wrap" %}

```json
{
  "schema": "string",
  "table": "string",
  "column": "string",
  "metadata": {
    "generatorId": "ArrayJsonMaskGenerator",
    "presetId": "ArrayJsonMaskGenerator",
    "customValueProcessor": "string", //If custom value processor applied to the generator
    "pathExpression": "string",
    "jsonFilterTypes": [ enum ],
    "subGeneratorMetadata": {
      "generatorId": "string",
      "presetId": "string",
      //Metadata for the selected sub-generator
      "customValueProcessor": "string" //If custom value processor applied to the sub-generator
    }
  }
}
```

{% endcode %}

## Example replacement <a href="#generator-api-array-json-mask-replacement" id="generator-api-array-json-mask-replacement"></a>

The following example replacement applies the built-in generator preset for the Geo generator to the value at the specified path expression.

The configuration for the Geo generator indicates that it is a latitude value.

```json
{
  "name": "location",
  "schema": "public",
  "table": "offices",
  "links": [
    {
      "schema": "public",
      "table": "offices",
      "column": "location",
      "metadata": {
        "generatorId": "ArrayJsonMaskGenerator",
        "presetId": "ArrayJsonMaskGenerator",
        "pathExpression": "$.value",
        "jsonFilterTypes": [
          0
        ],
        "subGeneratorMetadata": {
          "presetId": "GeoGenerator",
          "generatorId": "GeoGenerator",
          "geoType": "Latitude"
        }
      }
    }
  ]
}
```


---

# 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.tonic.ai/app/api/quick-start-guide/tonic-api-generator-assignment/generator-api-reference/generator-api-ref-array-json-mask.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.
