<?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 Convert a JSON object in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Convert-a-JSON-object/m-p/2081689#M88720</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;is it possible to transform a json object into columns? I found the following solution, but this works only if all the values are strings. If I've subproperties or numeric fields it doesn'work.&lt;/P&gt;
&lt;P&gt;For example if the json object look like this for source Product,width,amount,height,length the values are empty.&lt;/P&gt;
&lt;P&gt;Does it exist a easy solution to transform json field into columns?&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Sigrid&lt;/P&gt;
&lt;P&gt;{"posNumber": "181020212034",&lt;BR /&gt;"plugedSites": 2, &lt;BR /&gt;"sourceProduct": {&lt;BR /&gt;"width": 1200, &lt;BR /&gt;"amount": 20, &lt;BR /&gt;"height": 42, &lt;BR /&gt;"length": 5000, &lt;BR /&gt;"quality": "B/", &lt;BR /&gt;"woodtype": "HF1",&lt;BR /&gt;"productId": "00438"}&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;[BOOKINGS]:&lt;BR /&gt;LOAD &lt;BR /&gt;RecNo() as RecId,&lt;BR /&gt;id as Field1,&lt;BR /&gt;timestamp as Field2,&lt;BR /&gt;properties as Field3;&lt;BR /&gt;SQL&lt;BR /&gt;select id,timestamp,properties &lt;BR /&gt;from production.bookings;&lt;/P&gt;
&lt;P&gt;Attributes:&lt;BR /&gt;Generic&lt;BR /&gt;LOAD&lt;BR /&gt;RecId,&lt;BR /&gt;TextBetween(Attribute, '"', '"'),&lt;BR /&gt;TextBetween(Value, '"', '"')&lt;BR /&gt;;&lt;BR /&gt;LOAD&lt;BR /&gt;RecId,&lt;BR /&gt;SubField(pair, ':', 1) as Attribute,&lt;BR /&gt;SubField(pair, ':', 2) as Value&lt;BR /&gt;;&lt;BR /&gt;LOAD&lt;BR /&gt;RecId,&lt;BR /&gt;SubField(raw, ',') as pair&lt;BR /&gt;;&lt;BR /&gt;LOAD&lt;BR /&gt;RecNo() as RecId, // Id used to stitch rows back together&lt;BR /&gt;TextBetween(Field3, '{', '}') as raw&lt;BR /&gt;Resident [BOOKINGS];&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 08 Jun 2023 13:16:56 GMT</pubDate>
    <dc:creator>sigrid1</dc:creator>
    <dc:date>2023-06-08T13:16:56Z</dc:date>
    <item>
      <title>Convert a JSON object</title>
      <link>https://community.qlik.com/t5/App-Development/Convert-a-JSON-object/m-p/2081689#M88720</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;is it possible to transform a json object into columns? I found the following solution, but this works only if all the values are strings. If I've subproperties or numeric fields it doesn'work.&lt;/P&gt;
&lt;P&gt;For example if the json object look like this for source Product,width,amount,height,length the values are empty.&lt;/P&gt;
&lt;P&gt;Does it exist a easy solution to transform json field into columns?&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Sigrid&lt;/P&gt;
&lt;P&gt;{"posNumber": "181020212034",&lt;BR /&gt;"plugedSites": 2, &lt;BR /&gt;"sourceProduct": {&lt;BR /&gt;"width": 1200, &lt;BR /&gt;"amount": 20, &lt;BR /&gt;"height": 42, &lt;BR /&gt;"length": 5000, &lt;BR /&gt;"quality": "B/", &lt;BR /&gt;"woodtype": "HF1",&lt;BR /&gt;"productId": "00438"}&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;[BOOKINGS]:&lt;BR /&gt;LOAD &lt;BR /&gt;RecNo() as RecId,&lt;BR /&gt;id as Field1,&lt;BR /&gt;timestamp as Field2,&lt;BR /&gt;properties as Field3;&lt;BR /&gt;SQL&lt;BR /&gt;select id,timestamp,properties &lt;BR /&gt;from production.bookings;&lt;/P&gt;
&lt;P&gt;Attributes:&lt;BR /&gt;Generic&lt;BR /&gt;LOAD&lt;BR /&gt;RecId,&lt;BR /&gt;TextBetween(Attribute, '"', '"'),&lt;BR /&gt;TextBetween(Value, '"', '"')&lt;BR /&gt;;&lt;BR /&gt;LOAD&lt;BR /&gt;RecId,&lt;BR /&gt;SubField(pair, ':', 1) as Attribute,&lt;BR /&gt;SubField(pair, ':', 2) as Value&lt;BR /&gt;;&lt;BR /&gt;LOAD&lt;BR /&gt;RecId,&lt;BR /&gt;SubField(raw, ',') as pair&lt;BR /&gt;;&lt;BR /&gt;LOAD&lt;BR /&gt;RecNo() as RecId, // Id used to stitch rows back together&lt;BR /&gt;TextBetween(Field3, '{', '}') as raw&lt;BR /&gt;Resident [BOOKINGS];&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 13:16:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Convert-a-JSON-object/m-p/2081689#M88720</guid>
      <dc:creator>sigrid1</dc:creator>
      <dc:date>2023-06-08T13:16:56Z</dc:date>
    </item>
  </channel>
</rss>

