I have an object returned from a field msgthat is an object. I tried to get the value from msg and convert it to a string to use .startswith(). I am trying to do the following.
var msgstring = msg.value
if(msgstring.startsWith("string")){
}
However, I get the following error ...
Uncaught TypeError: Object string here has no method 'startsWith'
Where am I going wrong?
source
share