Is it possible to make a dictionary out of this sequence with jquery/javascript?
key:value
<div id="hidden_loaded_deals">
<div>1:5</div>
<div>2:5</div>
</div>
I tried this:
$('#hidden_loaded_deals > div').text()
and the result is:
"1:52:5"
It looses the separation between the strings in order to push them later into a dictionary.
is there a function out of the box todo that?
Koolnic’s answer is very good, but I would suggest using object literal as a key-value store. Then you can use
for insyntax for looping the keys.