How do i trim and get the value after a special character from a hidden field The hidden field value is like this
Code
//var val = $("#FieldId").val()
//Get Value of hidden field by val() jquery function I'm using example string.
var val = "String to find after - DEMO"
var foundString = val.substr(val.indexOf(' - ')+3,)
console.log(foundString);