Discussion:
convert json format to csv
(too old to reply)
tharun reddy
2018-09-07 08:40:24 UTC
Permalink
how to parse the json data to csv file in TDI
j***@gmail.com
2018-09-07 13:17:31 UTC
Permalink
Post by tharun reddy
how to parse the json data to csv file in TDI
Use the File Connector with the CSV Parser.
tharun reddy
2018-09-10 07:42:02 UTC
Permalink
Post by j***@gmail.com
Post by tharun reddy
how to parse the json data to csv file in TDI
Use the File Connector with the CSV Parser.
But there is one array on json how to parse and get that values
Franzw
2018-09-10 08:14:16 UTC
Permalink
Post by tharun reddy
Post by j***@gmail.com
Post by tharun reddy
how to parse the json data to csv file in TDI
Use the File Connector with the CSV Parser.
But there is one array on json how to parse and get that values
Go to Eddie's blog and take a crsh course on XML/JSON - for your specific problem this is probably here you can start (but recommendation is to go through all 6 parts - and probably read the whole lot :-)) : http://www.tdiingoutloud.com/2016/11/json-and-xml-tutorial-part-4-json.html

HTH
Regards
Franz Wolfhagen
tharun reddy
2018-09-10 10:20:20 UTC
Permalink
Post by Franzw
Post by tharun reddy
Post by j***@gmail.com
Post by tharun reddy
how to parse the json data to csv file in TDI
Use the File Connector with the CSV Parser.
But there is one array on json how to parse and get that values
Go to Eddie's blog and take a crsh course on XML/JSON - for your specific problem this is probably here you can start (but recommendation is to go through all 6 parts - and probably read the whole lot :-)) : http://www.tdiingoutloud.com/2016/11/json-and-xml-tutorial-part-4-json.html
HTH
Regards
Franz Wolfhagen
there is no array on json data what u share the link

this is the data what i have

"@remote_erDDSEmployeeNumber": [
{
"oldValue": null,
"newValue": "00323"
}
],

output is

0:[object Object]

Regards ,
Tarun
Eddie Hartman
2018-09-11 08:04:48 UTC
Permalink
Post by tharun reddy
Post by Franzw
Post by tharun reddy
Post by j***@gmail.com
Post by tharun reddy
how to parse the json data to csv file in TDI
Use the File Connector with the CSV Parser.
But there is one array on json how to parse and get that values
Go to Eddie's blog and take a crsh course on XML/JSON - for your specific problem this is probably here you can start (but recommendation is to go through all 6 parts - and probably read the whole lot :-)) : http://www.tdiingoutloud.com/2016/11/json-and-xml-tutorial-part-4-json.html
HTH
Regards
Franz Wolfhagen
there is no array on json data what u share the link
this is the data what i have
{
"oldValue": null,
"newValue": "00323"
}
],
output is
0:[object Object]
Regards ,
Tarun
If you let Javascript turn a Javascript object to string you get this Object[object:Object] stuff. You can alternatively use the built-in toJson() function to turn your Javascript object to a JSON string. Note that it's the reverse of the fromJSON function to convert JSON String to JS object.

If you want to parse a JSON object to an Entry (e.g. for writing out to a file or other target) use the Entry classes's static fromJSON() and toJSON() methods (notice the capitalization that differentiates these fromt he built-in functions). So if you have a JSON string in a variable called jsonStr you can turn this into any Entry like this:

myEntry = com.ibm.di.entry.Entry.fromJSON(jsonStr);

There are more examples in my blog post series.

/Eddie

Loading...