Issue
I am getting data in a variable as ""Value""
. So, I want to remove quotes but only inner quotes.
I tried with this but it's not working.
var value = "fetchedValue";
value = value.replace(/\"/g, "");
Can anyone explain with an example?
expected = "Value"
Solution
It's weird. Your solution should work.
Well, try this:
var value = "fetchedValue";
value = value.slice(1, -1);
Answered By - Sagar Chaudhary
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.