Get value of "data"
Posted
by Nicole Loyal-Windham
on Stack Overflow
See other posts from Stack Overflow
or by Nicole Loyal-Windham
Published on 2010-03-28T11:11:33Z
Indexed on
2010/03/28
11:23 UTC
Read the original article
Hit count: 245
Hi,
I need to figure out the value of data strings with jquery, for example like this:
{ label: "Beginner", data: 2},
{ label: "Advanced", data: 12},
{ label: "Expert", data: 22},
to add them up.
Something like:
var sum = data1+data2+data3;
alert(sum);
So the result for this example would be 36.
Appreciate your help!
Nicole
© Stack Overflow or respective owner