<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Nifi : Array of json elements to list of json elements in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Nifi-Array-of-json-elements-to-list-of-json-elements/m-p/240632#M85572</link>
    <description>&lt;P&gt;Output Grouping... magical property &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;That did the trick. Thanks a lot Matt!&lt;/P&gt;</description>
    <pubDate>Tue, 18 Dec 2018 16:45:52 GMT</pubDate>
    <dc:creator>jlmoreno</dc:creator>
    <dc:date>2018-12-18T16:45:52Z</dc:date>
    <item>
      <title>Nifi : Array of json elements to list of json elements</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Nifi-Array-of-json-elements-to-list-of-json-elements/m-p/240630#M85570</link>
      <description>&lt;P&gt;I have a json input which structure is as follows:&lt;/P&gt;&lt;PRE&gt;[
  {
    "line": [
      {
        "element1": 4.908278133674332,
        "element2": 45.8293948360587
      },
      {
        "element1": 4.90838573779603,
        "element2": 45.82938855483125
      }
    ],
    "coord": 1749,
    "xenius": "LYO01749",
    "label": "R M. BASTIE",
    "date": "2018-12-17"
  },
  {
    "line": [
      {
        "element1": 7.908278133674332,
        "element2": 8.8293948360587
      },
      {
        "element1": 4.555,
        "element2": 42.34534
      }
    ],
    "coord": 223,
    "xenius": "LYO01749",
    "label": "R M. BASTIE",
    "date": "2018-12-17"
  }
]&lt;/PRE&gt;&lt;P&gt;And I would like to convert it into a list of json elements. Something like:&lt;/P&gt;&lt;PRE&gt;{
    "line": [
      {
        "element1": 4.908278133674332,
        "element2": 45.8293948360587
      },
      {
        "element1": 4.90838573779603,
        "element2": 45.82938855483125
      }
    ],
    "coord": 1749,
    "xenius": "LYO01749",
    "label": "R M. BASTIE",
    "date": "2018-12-17"
  }
{
    "line": [
      {
        "element1": 7.908278133674332,
        "element2": 8.8293948360587
      },
      {
        "element1": 4.555,
        "element2": 42.34534
      }
    ],
    "coord": 223,
    "xenius": "LYO01749",
    "label": "R M. BASTIE",
    "date": "2018-12-17"
  }&lt;/PRE&gt;&lt;P&gt;How could I do that with a json or jolt transformation, and not using SplitRecord? &lt;/P&gt;&lt;P&gt;Please note that I just want to get all the elements of the array and output them as a list of json elements, without the parent array.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Dec 2018 23:04:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Nifi-Array-of-json-elements-to-list-of-json-elements/m-p/240630#M85570</guid>
      <dc:creator>jlmoreno</dc:creator>
      <dc:date>2018-12-17T23:04:43Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi : Array of json elements to list of json elements</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Nifi-Array-of-json-elements-to-list-of-json-elements/m-p/240631#M85571</link>
      <description>&lt;P&gt;You can use ConvertRecord for this, your JsonRecordSetWriter would have its Output Grouping property set to "One Line Per Object". The individual objects won't be pretty printed in the output as you have above, but it will remove the array braces as well as the comma delimiter, and just output each element of the above array as a JSON object on its own line.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Dec 2018 02:37:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Nifi-Array-of-json-elements-to-list-of-json-elements/m-p/240631#M85571</guid>
      <dc:creator>mburgess</dc:creator>
      <dc:date>2018-12-18T02:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi : Array of json elements to list of json elements</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Nifi-Array-of-json-elements-to-list-of-json-elements/m-p/240632#M85572</link>
      <description>&lt;P&gt;Output Grouping... magical property &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;That did the trick. Thanks a lot Matt!&lt;/P&gt;</description>
      <pubDate>Tue, 18 Dec 2018 16:45:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Nifi-Array-of-json-elements-to-list-of-json-elements/m-p/240632#M85572</guid>
      <dc:creator>jlmoreno</dc:creator>
      <dc:date>2018-12-18T16:45:52Z</dc:date>
    </item>
  </channel>
</rss>

