<?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>topic RESTRequest JSON to CSV format - repeating arrays in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/RESTRequest-JSON-to-CSV-format-repeating-arrays/m-p/2197986#M1495</link>
    <description>&lt;P&gt;Hello together!&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;At the moment I have no other idea.. since hours no real success (ok - I am not an expert..), maybe someone can help me &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I am trying to solve the following scenario:&lt;/P&gt; 
&lt;OL&gt; 
 &lt;LI&gt;REST Webservice is receiving the following JSON content:&lt;PRE&gt;{
	"JsonLanguage": "en",
	"RestService": "CreateFile",

	"App1": {
		"Meta1": "mainapp1",
		"Meta2": "c",
		"Meta3": "abcdefghijklmnopqrstuvwxyz1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234"
	},
	"App1Sub1": [
		{
		"Meta1Sub1": "subapp1",
		"Meta2Sub1": "e",
		},
		{
		"Meta1Sub1": "subapp1a",
		"Meta2Sub1": "g",
		},
		{
		"Meta1Sub1": "subapp1b",
		"Meta2Sub1": "d",
		}
		],
	"App1Sub2": [
	{
		"Meta1Sub2": "subapp2",
		"Meta2Sub2": "test 2",
	},
	{	
		"Meta1Sub2": "subapp2a",
		"Meta2Sub2": "test 1",
	}
	],
}&lt;/PRE&gt;&lt;/LI&gt; 
 &lt;LI&gt;Result should be a csv file with the following content:&lt;PRE&gt;App1|mainapp1|c|abcdefghijklmnopqrstuvwxyz1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234
App1Sub1|subapp1|e
App1Sub1|subapp1a|g
App1Sub1|subapp1b|d
App1Sub2|subapp2|test 2
App1Sub2|subapp2a|test 1&lt;/PRE&gt;&lt;P&gt;My problem is - I don't know how to create the csv file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried different scenarios:&lt;/P&gt;&lt;P&gt;- using more than one tExtractJSON, no success&lt;/P&gt;&lt;P&gt;- trying to extract the data with tXMLMap and tMAP, created small expressions to get each line beginning with the JSON field name "App1|" + row1.Meta1... but it is not working with arrays.&lt;/P&gt;&lt;P&gt;- the idea to save the JSON values in a database and after that.. extracting as csv&lt;/P&gt;&lt;P&gt;- the idea to save the JSON values in a XML file -&amp;gt; after that converting to csv&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Point is... it would be ok if I change the JSON format, if the format is not good to create such a csv file. But the csv file.. cannot be changed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank u so much – and best regards&lt;/P&gt;&lt;P&gt;Vera&lt;/P&gt;&lt;/LI&gt; 
&lt;/OL&gt;</description>
    <pubDate>Sat, 16 Nov 2024 06:50:15 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T06:50:15Z</dc:date>
    <item>
      <title>RESTRequest JSON to CSV format - repeating arrays</title>
      <link>https://community.qlik.com/t5/Talend-Studio/RESTRequest-JSON-to-CSV-format-repeating-arrays/m-p/2197986#M1495</link>
      <description>&lt;P&gt;Hello together!&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;At the moment I have no other idea.. since hours no real success (ok - I am not an expert..), maybe someone can help me &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I am trying to solve the following scenario:&lt;/P&gt; 
&lt;OL&gt; 
 &lt;LI&gt;REST Webservice is receiving the following JSON content:&lt;PRE&gt;{
	"JsonLanguage": "en",
	"RestService": "CreateFile",

	"App1": {
		"Meta1": "mainapp1",
		"Meta2": "c",
		"Meta3": "abcdefghijklmnopqrstuvwxyz1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234"
	},
	"App1Sub1": [
		{
		"Meta1Sub1": "subapp1",
		"Meta2Sub1": "e",
		},
		{
		"Meta1Sub1": "subapp1a",
		"Meta2Sub1": "g",
		},
		{
		"Meta1Sub1": "subapp1b",
		"Meta2Sub1": "d",
		}
		],
	"App1Sub2": [
	{
		"Meta1Sub2": "subapp2",
		"Meta2Sub2": "test 2",
	},
	{	
		"Meta1Sub2": "subapp2a",
		"Meta2Sub2": "test 1",
	}
	],
}&lt;/PRE&gt;&lt;/LI&gt; 
 &lt;LI&gt;Result should be a csv file with the following content:&lt;PRE&gt;App1|mainapp1|c|abcdefghijklmnopqrstuvwxyz1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234
App1Sub1|subapp1|e
App1Sub1|subapp1a|g
App1Sub1|subapp1b|d
App1Sub2|subapp2|test 2
App1Sub2|subapp2a|test 1&lt;/PRE&gt;&lt;P&gt;My problem is - I don't know how to create the csv file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried different scenarios:&lt;/P&gt;&lt;P&gt;- using more than one tExtractJSON, no success&lt;/P&gt;&lt;P&gt;- trying to extract the data with tXMLMap and tMAP, created small expressions to get each line beginning with the JSON field name "App1|" + row1.Meta1... but it is not working with arrays.&lt;/P&gt;&lt;P&gt;- the idea to save the JSON values in a database and after that.. extracting as csv&lt;/P&gt;&lt;P&gt;- the idea to save the JSON values in a XML file -&amp;gt; after that converting to csv&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Point is... it would be ok if I change the JSON format, if the format is not good to create such a csv file. But the csv file.. cannot be changed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank u so much – and best regards&lt;/P&gt;&lt;P&gt;Vera&lt;/P&gt;&lt;/LI&gt; 
&lt;/OL&gt;</description>
      <pubDate>Sat, 16 Nov 2024 06:50:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/RESTRequest-JSON-to-CSV-format-repeating-arrays/m-p/2197986#M1495</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T06:50:15Z</dc:date>
    </item>
  </channel>
</rss>

