cancel
Showing results for 
Search instead for 
Did you mean: 

Splitting JSON Array To multiple Fixed width items

jomalladi
New Contributor

Hello all,
I have a request where we have a JSON array and we would need to split them up as multiple fixed width items. The output should be a file for each json array → multiple lines of fixed width items separated by new lines.

Input :
[
{
“group”: [
{
“Matter”: “xxxxxx.xxxxx”,
“Timekeeper”: “”,
“CostCode”: “C”,
“Quantity”: “1.0000”,
“Rate”: “800.00”,
“LineItemTotal”: “800.00”,
“CostLocation”: “”,
“TimekeeperNotUsed”: “”,
“UnUsed”: “”,
“VoucherType”: “”,
“Company”: “”,
“Currency”: “USD”,
“VendorCode”: “4567890”,
“VendorInvoiceNumber”: “4567890024”,
“InvoiceDate”: “2018-11-30”,
“InvoiceAmount”: “800.00”,
“ReferenceNumber”: “”,
“GLNumber”: “”,
“GLDepartment”: “”,
“TaxAmount1”: “”,
“TaxAmount2”: “”,
“VoucherType3”: “”,
“TaxCode”: “”,
“TransactionDate”: “022019”
}
]
}
]

output : FileSamplePipeline_2019_02_20 (1).slp (27.2 KB)

022019xxxxxx.xxxxx C 1.0000 800.00 800.00
45678904567890024 2018-11-30800.00

The output of the first example in the samplePipeline gives me a file will give a file without a new line between the items. The second example I am not sure on how to merge the line items after the Fixed width formatter. Can you please help me out? Also, let me know if you need more information.

Appreciate all your help!
Thank you,
Jyotsna

0 REPLIES 0