Maybe I'm making a very stupid mistake but here it goes. I want to take [ 'hr' ] and turn it into [ '* * *' ] So I did this:
var hr = jsonml[i]
console.log(hr)
// outputs: [ 'hr' ]
hr.replace(/hr/g, '* * *')
But I get this error:
TypeError: Object hr has no method 'replace'
What am I doing wrong?
hrshould be of typeString