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

# Converting Specific Field to Array Type

> You can convert specific fields within JSON data to array type. This page includes an example of converting string values to array format using cardinality operation.

This example will show how to **convert** "Alan1" and "Alan2" fields within existing JSON data **to array**.

### Input Value

```json theme={null}
{
  "statusCode": 200,
  "statusDescription": "OK",
  "numRows": 1,
  "data": [
    {
      "data": {
        "Alan1": "içerik1",
        "Alan2": "içerik2",
        "Alan3": 1,
        "Alan4": "içerik3",
        "Alan5": "içerik4",
        "NewField": "test"
      }
    }
  ],
  "elapsedTime": 1,
  "errors": []
}
```

### JOLT Specification

```json theme={null}
[
  {
    "operation": "cardinality",
    "spec": {
      "data": {
        "*": {
          "data": {
            "Alan1": "MANY"
          }
        }
      }
    }
  },
  {
    "operation": "cardinality",
    "spec": {
      "data": {
        "*": {
          "data": {
            "Alan2": "MANY"
          }
        }
      }
    }
  }
]
```

### Output Value

```json theme={null}
{
  "statusCode": 200,
  "statusDescription": "OK",
  "numRows": 1,
  "data": [
    {
      "data": {
        "Alan1": ["içerik1"],
        "Alan2": ["içerik2"],
        "Alan3": 1,
        "Alan4": "içerik3",
        "Alan5": "içerik4",
        "NewField": "test"
      }
    }
  ],
  "elapsedTime": 1,
  "errors": []
}
```
