 <p>You could give your own cookies a recognizable label and then grab that conditionally when you're compiling your array. Like so:</p> <pre><code>$cookies.put('city.' + cityToAddID, cityToAdd); ... $.each(allCitys, function(index, value) { if (index.indexOf('city.') == 0) { favouritesFromCookie.push(value) } }); </code></pre>