Could someone please assist me in converting my array of objects into an object or JSON format? Here is a sample snippet:
var data = [
{"code":"M","montant":"2000","title":"Masculine"},
{"code":"F","montant":"1000","title":"Feminine"},
{"code":"X","montant":"5000","title":"Others"}
];
I would like the data to be in the following format:
var data = {"code":"M","montant":"2000","title":"Masculine"},
{"code":"F","montant":"1000","title":"Feminine"},
{"code":"X","montant":"5000","title":"Others"};
Any assistance would be greatly appreciated. Thank you!