I'm trying to parse string to json object but i always get the same error SyntaxError: unexpected token '
var data = ('{' + fields.productName.toString() + ":" + parseInt(fields.quantity.toString()) + '}' );
I tried few variation of this but nothing works.
JSON.stringify.