0
I need to remove the quotes from a string I receive in json, for this I am creating a pipe, but I am not able to remove double quotes.
I tried something like:
@Pipe({
name: 'prettyprint'
})
export class PrettyPrintPipe implements PipeTransform {
transform(val) {
return JSON.stringify(val, null, 2)
.replace("\"", "")
.replace("{", "")
.replace("}", "");
}
}
Também tentei:
.replace(`""`, "")
But without success, the quotes don’t come out.
Any idea?
Have you tried using REGEX to "delete" the quotes? <https://www.w3schools.com/jsref/jsref_obj_regexp.asp>
– Gunblades
tries the famous Symbol('"');
– Willian