Skip to main content

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.

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

Input Value

{
  "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

[
  {
    "operation": "cardinality",
    "spec": {
      "data": {
        "*": {
          "data": {
            "Alan1": "MANY"
          }
        }
      }
    }
  },
  {
    "operation": "cardinality",
    "spec": {
      "data": {
        "*": {
          "data": {
            "Alan2": "MANY"
          }
        }
      }
    }
  }
]

Output Value

{
  "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": []
}