title: How to split the multiple json objects present in a json array in Apache NiFi?
body: <p><strong>Example Input is below:
  I need to split JSON objects present in a JSON array into individual  JSON files using Apache NiFi and publish it to a Kafka Topic. There are multiple JSON objects present in the below array</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>[
  {
      "stops": "1 Stop",
      "ticket price": "301.20",
      "days to departure": -1,
      "date of extraction": "03/22/2019",
      "departure": ", Halifax",
      "arrival": ", Toronto",
      "flight duration": "0 days 3 hours 58 minutes",
      "airline": "Porter Airlines",
      "plane": "DE HAVILLAND DHC-8 DASH 8-400 DASH 8Q",
      "timings": [
          {
              "departure_airport": "Halifax, NS, Canada (YHZ-Stanfield Intl.)",
              "departure_date": "03/22/2019",
              "departure_time": "6:40pm",
              "arrival_airport": "Ottawa, ON, Canada (YOW-Macdonald-Cartier Intl.)",
              "arrival_time": "7:58pm"
          },
          {
              "departure_airport": "Ottawa, ON, Canada (YOW-Macdonald-Cartier Intl.)",
              "departure_date": "03/22/2019",
              "departure_time": "8:30pm",
              "arrival_airport": "Toronto, ON, Canada (YTZ-Billy Bishop Toronto City)",
              "arrival_time": "9:38pm"
          }
      ],
      "plane code": "DH4",
      "id": "8e6c69c8-65e0-4f1b-b540-ae61abf8aa6d"
  },
  {
      "stops": "Nonstop",
      "ticket price": "390.95",
      "days to departure": -1,
      "date of extraction": "03/22/2019",
      "departure": ", Halifax",
      "arrival": ", Toronto",
      "flight duration": "0 days 2 hours 35 minutes",
      "airline": "Air Canada",
      "plane": "Boeing 767-300",
      "timings": [
          {
              "departure_airport": "Halifax, NS, Canada (YHZ-Stanfield Intl.)",
              "departure_date": "03/22/2019",
              "departure_time": "7:40pm",
              "arrival_airport": "Toronto, ON, Canada (YYZ-Pearson Intl.)",
              "arrival_time": "9:15pm"
          }
      ],
      "plane code": "763",
      "id": "fc13c5cb-93d1-46f9-b496-abbf6faba85a"
  },
  {
      "stops": "Nonstop",
      "ticket price": "391.33",
      "days to departure": -1,
      "date of extraction": "03/22/2019",
      "departure": ", Halifax",
      "arrival": ", Toronto",
      "flight duration": "0 days 2 hours 30 minutes",
      "airline": "WestJet",
      "plane": "BOEING 737-700 (WINGLETS) PASSENGER",
      "timings": [
          {
              "departure_airport": "Halifax, NS, Canada (YHZ-Stanfield Intl.)",
              "departure_date": "03/22/2019",
              "departure_time": "7:10pm",
              "arrival_airport": "Toronto, ON, Canada (YYZ-Pearson Intl.)",
              "arrival_time": "8:40pm"
          }
      ],
      "plane code": "73W",
      "id": "4d49c24b-6fb0-4f45-ba05-a3969ce7308a"
  }
  ]</code></pre>
  </div>
  </div>
  </p>
  
  <p><strong>Needed Output:
  Individual JSON objects like below. I would like to post each JSON object to a Kafka topic.</strong></p>
  
  <pre><code>{
          "stops": "Nonstop",
          "ticket price": "390.95",
          "days to departure": -1,
          "date of extraction": "03/22/2019",
          "departure": ", Halifax",
          "arrival": ", Toronto",
          "flight duration": "0 days 2 hours 35 minutes",
          "airline": "Air Canada",
          "plane": "Boeing 767-300",
          "timings": [
              {
                  "departure_airport": "Halifax, NS, Canada (YHZ-Stanfield Intl.)",
                  "departure_date": "03/22/2019",
                  "departure_time": "7:40pm",
                  "arrival_airport": "Toronto, ON, Canada (YYZ-Pearson Intl.)",
                  "arrival_time": "9:15pm"
              }
          ],
          "plane code": "763",
          "id": "fc13c5cb-93d1-46f9-b496-abbf6faba85a"
      }
  </code></pre>