In Javascript I try to use stringify but it keeps returning an empty string. What is wrong here? Feel free to edit the Fiddle.
JS
values = [];
values['belopp'] = 2322;
values['test'] = 'jkee';
str = JSON.stringify(values);
console.log(values);
console.log(str); // Expected to show a json array
JS Fiddle