I have data like
[{somevalue1},{somevalue2}]
I want to extract datawithin the braces
I used
var data = data.match(/[{][^\"]+[}]/g);
But I receive null value.
I have data like
[{somevalue1},{somevalue2}]
I want to extract datawithin the braces
I used
var data = data.match(/[{][^\"]+[}]/g);
But I receive null value.
You can use this:
data = data.match(/\{([\w\s]*)\}/g);
\w will look for alphanumeric, and \s for spaces.