If I have an array with prices represented as strings like
price=["1@1000", "1000@2000"]
What is the best way to convert this array into JSON format in order to utilize it in an AJAX call with jQuery?
$.ajax({
type: 'POST',
url: '',
data: {
'price': price
},
dataType: 'JSON',
success: function(data) {
console.log("success");
console.log(data);
var products = data.products;
console.log(products);
},
});