Four Stars

Replace \n in Object type field

Hi Team,

 

I have one scenario where column has data type Object. But in that field, I am getting \n and I want to replace it with " ".

But when I am using tReplace component as well as replaceAll() method, I am getting error as those function work on String Data type.

Is there any other way to replace \n with space other than converting the data type from Object to String and then use replace function?

 

Please provide me your comments. Early responce appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Nine Stars

Re: Replace \n in Object type field

Yes but probably involves more java code...
Objects are stored in bytes, so you need to replace the byte which corresponds to \n with the bytes you want it to replaced by...
Just go for the object -> string -> replace -> object
1 REPLY
Nine Stars

Re: Replace \n in Object type field

Yes but probably involves more java code...
Objects are stored in bytes, so you need to replace the byte which corresponds to \n with the bytes you want it to replaced by...
Just go for the object -> string -> replace -> object