<?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 Jolt - Nearly perfect, just need to remove square brackets in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Jolt-Nearly-perfect-just-need-to-remove-square-brackets/m-p/242304#M204107</link>
    <description>&lt;P&gt;I'm so close with this but afraid I do need a hand with a jolt transformation. I've done most of the work but can't get the last transformation working. I need to have it output without the square brackets. &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Here is my data:&lt;/P&gt;&lt;PRE&gt;{
"totalElements": 168,
"columns": {
"dimension": {
"id": "variables/daterangehour",
"type": "time"
},
"columnIds": [
"1"
]
},
"rows": [
{
"itemId": "119050300",
"value": "00:00 2019-06-03",
"data": [
120
]
},
{
"itemId": "119050805",
"value": "05:00 2019-06-08",
"data": [
98
]
},
{
"itemId": "119050923",
"value": "23:00 2019-06-09",
"data": [
172
]
}
]
}
}
&lt;/PRE&gt;&lt;P&gt;This is my Jolt:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;[{
"operation": "shift",
"spec": {
"rows": {
"*": {
"value": "[&amp;amp;1].date",
"data": "[&amp;amp;1].data"
}
}
}
}
]&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;It gives me this result:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;[ {
"date" : "00:00 2019-06-03",
"data" : [ 120 ]
}, {
"date" : "22:00 2019-06-09",
"data" : [ 307 ]
}, {
"date" : "23:00 2019-06-09",
"data" : [ 172 ]
} ]
&lt;/PRE&gt;&lt;P&gt;This causes my system issues, I actual need the data field like this:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;[ {
"date" : "00:00 2019-06-03",
"data" : "120"
}, {
"date" : "05:00 2019-06-08",
"data" : "98"
} ]&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;How do I pluck the item out of the array / square brackets? It will only ever be one item in there.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 12 Jun 2019 01:43:46 GMT</pubDate>
    <dc:creator>james_willson1</dc:creator>
    <dc:date>2019-06-12T01:43:46Z</dc:date>
  </channel>
</rss>

