Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have some data which I need to create a JSON.
My sample data shows like this:
Raw Data
tWriteJson - Properties
Column dup_code/ dup_desc is the trouble point. What is happening is that the output JSON is repeating the whole JSON content. I guess its a limitation of being able to set a single loop element.
I am trying to get an output where the data is not duplicated.
{
"My_Data": {
"metadata": {
"name": "name",
"zip": "zip"
},
"op": [{
"m_id": "1",
"f_dt": "2011-01-01",
"t_dt": "2011-02-01",
"x": [{
"x_position": "1",
"x_code": "dc1"
}, {
"x_position": "2",
"x_code": "dc2"
}, {
"x_position": "3",
"x_code": "dc3"
}],
"dup": [{
"dup_code": "dup1",
"dup_desc": "dup1_desc"
}, {
"dup_code": "dup2",
"dup_desc": "dup2_desc"
}]
}, {
"m_id": "2",
"f_dt": "2011-02-01",
"t_dt": "2011-03-01",
"x": {
"x_position": "3",
"x_code": "dc3"
},
"dup": {
"dup_code": "c1",
"dup_desc": "c1_desc"
}
}]
}
}
What are my options here?
Attached is my job for ready reference
Thanks in advance