I was wondering how to do this in the more cleaner and optimal way:
I have an Object with the following structure:
{ \"125\": 2, \"439\": 3,
Hmm... not sure if I got at, but maybe something like this:
var myObj = { "125": 2, "439": 3, "560": 1, "999": 2 }, myArray = []; for(k in myObj){ for(i = 0; i < myObj[k]; i++){ myArray.push(k); } } console.log(myArray)