Link to home
Start Free TrialLog in
Avatar of Zolf
ZolfFlag for United Arab Emirates

asked on

Angular 2 export some JSON data to CSV file

Hello there,

I want to create a csv file from a JSON string which I get from the backend. But I need to select which of the key value need to go into the csv file. For e.g. below is my JSON which I get from the server. I want to only export 5 key values i.e.
"speed":"10","max":"20","upper":"70","platform":"90","platformyposition":"95"

{"df":"6767677777777","sup":"11","single_batch":null,"package":"1","multi_batch":null,"shelf":"18","fdoname_en":"HJ","fdoname":"1","newic":"1","gtin":"1","status":null,"route":null,"pcategory":"RRRR","proline":null,"licensetype":null,"gname_en":"asasfff","speed":"10","max":"20","upper":"70","platform":"90","platformyposition":"95"},
{"df":"6767677777777","sup":"11","single_batch":null,"package":"1","multi_batch":null,"shelf":"18","fdoname_en":"HJ","fdoname":"1","newic":"1","gtin":"1","status":null,"route":null,"pcategory":"RRRR","proline":null,"licensetype":null,"gname_en":"asasfff","speed":"10","max":"20","upper":"70","platform":"90","platformyposition":"95"},{"df":"6767677777777","sup":"11","single_batch":null,"package":"1","multi_batch":null,"shelf":"18","fdoname_en":"HJ","fdoname":"1","newic":"1","gtin":"1","status":null,"route":null,"pcategory":"RRRR","proline":null,"licensetype":null,"gname_en":"asasfff","speed":"10","max":"20","upper":"70","platform":"90","platformyposition":"95"}

Open in new window


Please help!!
ASKER CERTIFIED SOLUTION
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Zolf

ASKER

thanks!!
You are welcome.