<?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 Re: How to remove surrounding [] and double quotes when extracting JSON data? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-remove-surrounding-and-double-quotes-when-extracting-JSON/m-p/2271925#M49372</link>
    <description>&lt;P&gt;I think this might be because you have a wildcard in your JSONPath for the arrays. If you change the * to a 0 in [] for your values, this should remove the brackets. Of course, it will only return the first instance of the array.&lt;/P&gt;</description>
    <pubDate>Wed, 29 Jan 2020 12:05:21 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-01-29T12:05:21Z</dc:date>
    <item>
      <title>How to remove surrounding [] and double quotes when extracting JSON data?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-remove-surrounding-and-double-quotes-when-extracting-JSON/m-p/2271923#M49370</link>
      <description>&lt;P&gt;We have a file which contains JSON data.&amp;nbsp; Using tFileInputJson component to extract data from it and some of the fields are surrounded by [ ] and double quotes.&amp;nbsp; What is the best method to remove surrounding characters?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="InputJson.PNG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8id.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/139502i86D109663EB2FC0A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8id.png" alt="0683p000009M8id.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Output:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RunWindow.PNG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8tB.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/150794iD083108BADC5E9E1/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8tB.png" alt="0683p000009M8tB.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;InputFile:&lt;/P&gt; 
&lt;P&gt;{&lt;BR /&gt;"Options": [&lt;BR /&gt;{&lt;BR /&gt;"Value": 111111,&lt;BR /&gt;"Color": "#0000ff",&lt;BR /&gt;"IsManaged": false,&lt;BR /&gt;"ExternalValue": "",&lt;BR /&gt;"ParentValues": [],&lt;BR /&gt;"MetadataId": null,&lt;BR /&gt;"HasChanged": null,&lt;BR /&gt;"Label": {&lt;BR /&gt;"LocalizedLabels": [&lt;BR /&gt;{&lt;BR /&gt;"Label": "United States",&lt;BR /&gt;"LanguageCode": 1033&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;},&lt;BR /&gt;"Description": {&lt;BR /&gt;"LocalizedLabels": [&lt;BR /&gt;{&lt;BR /&gt;"Label": "TestDescription1"&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"Value": 222222,&lt;BR /&gt;"Color": "#0000ff",&lt;BR /&gt;"IsManaged": false,&lt;BR /&gt;"ExternalValue": "",&lt;BR /&gt;"ParentValues": [],&lt;BR /&gt;"MetadataId": null,&lt;BR /&gt;"HasChanged": null,&lt;BR /&gt;"Label": {&lt;BR /&gt;"LocalizedLabels": [&lt;BR /&gt;{&lt;BR /&gt;"Label": "Canada",&lt;BR /&gt;"LanguageCode": 1033&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;},&lt;BR /&gt;"Description": {&lt;BR /&gt;"LocalizedLabels": [&lt;BR /&gt;{&lt;BR /&gt;"Label": "TestDescription2"&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 03:26:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-remove-surrounding-and-double-quotes-when-extracting-JSON/m-p/2271923#M49370</guid>
      <dc:creator>rp2018</dc:creator>
      <dc:date>2024-11-16T03:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove surrounding [] and double quotes when extracting JSON data?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-remove-surrounding-and-double-quotes-when-extracting-JSON/m-p/2271924#M49371</link>
      <description>It should be possible (?) within the tFileInputJSON but at least you can change the value using a tMap with this regex (not verified) for the desired fields:&lt;BR /&gt;row1.Label.replaceAll("[\[\]\"", "")</description>
      <pubDate>Wed, 29 Jan 2020 10:54:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-remove-surrounding-and-double-quotes-when-extracting-JSON/m-p/2271924#M49371</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2020-01-29T10:54:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove surrounding [] and double quotes when extracting JSON data?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-remove-surrounding-and-double-quotes-when-extracting-JSON/m-p/2271925#M49372</link>
      <description>&lt;P&gt;I think this might be because you have a wildcard in your JSONPath for the arrays. If you change the * to a 0 in [] for your values, this should remove the brackets. Of course, it will only return the first instance of the array.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2020 12:05:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-remove-surrounding-and-double-quotes-when-extracting-JSON/m-p/2271925#M49372</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-29T12:05:21Z</dc:date>
    </item>
  </channel>
</rss>

