Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Eric_Talend
Creator
Creator

conversion CSV/string to JSON/list ?

Hello,

I have a CSV file and I convert it to JSON file.

But I would like to change the JSON file like this :

CSV file :

"entities":"Siege"

JSON file :

I want to have :

"entities":["Siege"]

So, I would like to have an array from a string 🙂

It is possible ?

Many thanks.

1 Solution

Accepted Solutions
Eric_Talend
Creator
Creator
Author

I find the solution and it was simply.

 

I use the tConvertType component.

 

Input : Json file 1 with my string area

USe tConvertType component to convert string to list

Output : Json file 2 with my list area

 

Enjoy

View solution in original post

2 Replies
manodwhb
Champion II
Champion II

@Eric Vincent​ . you use substring and Index of functions to do that before of : and after of : values and concatenate [ ] and do that in tmap.

 

Thanks,

Manohar

Eric_Talend
Creator
Creator
Author

I find the solution and it was simply.

 

I use the tConvertType component.

 

Input : Json file 1 with my string area

USe tConvertType component to convert string to list

Output : Json file 2 with my list area

 

Enjoy