I’m trying to remove the £ symbol from array but not having much luck. This is my array:
var linedata = [["£14.99,£14.99,£14.99"],["£34.99,£34.99,£34.99"]]
and this is the regex code I’m using:
const regex = /£([0-9.]+,?)/gm; const subst = `$1`; const result = linedata.replace(regex, subst); console.log('substituted', result)
But its not working and I don’t know why, is it an ionic specific issue? The Ionic CLI is spitting out this error, but I don’t really know what it means, is it to do with me trying to use replace on an array?..
ERROR in src/app/home/home.page.ts(66,26): error TS2339: Property 'replace' does not exist on type 'any'.
Any help appreciated!