Click here to Skip to main content
15,921,959 members
Please Sign up or sign in to vote.
2.33/5 (2 votes)
See more:
hello there...
i have an array as follows

C#
var data = '[{"Date":"3/5/2014 12:00:00 AM","DataValue":48.1380920410156},{"Date":"3/8/2014 12:00:00 AM","DataValue":0.0000000000000000000399998436},{"Date":"3/6/2014 12:00:00 AM","DataValue":0.0000000000000000000399998436},{"Date":"3/7/2014 12:00:00 AM","DataValue":0.0000000000000000000399998436},{"Date":"3/4/2014 12:00:00 AM","DataValue":0.0000000000000000000399998436}]';


and i need to access each element in jquery

PHP
$.each(data, function (index, item) {
                alert(item.Date);
            });


but it's not working properly.
plz help me
Posted
Updated 16-Mar-14 6:08am
v2
Comments
Sergey Alexandrovich Kryukov 16-Mar-14 0:19am    
What is not "working properly"? And what did you expect?
—SA
Sampath Lokuge 16-Mar-14 12:07pm    
Check this : http://stackoverflow.com/questions/5289403/jquery-convert-javascript-array-to-string

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900