473,388 Members | 1,405 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

How to parse JSON in javascript to take value

56
Hi pals ,
I am really stuck in parsing a JSON string and take it's values. I got the json string as
Expand|Select|Wrap|Line Numbers
  1. {"user":{"id":"1","firstname":"Freelogin","created":"0000-00-00
  2. 00:00:00","lastname":"Administrator","email":"fred@websecurify.com",
  3. "usergroup_id":"1","status":"1","ip_enable":"N","priv":"0","expire":""},"data":{
  4. "1":{"5":{"last_update":"2010-12-13
  5. 16:16:16","status":"0"},"3":{"last_update":"2010-12-13
  6. 16:41:48","status":"1"}},"2":{"6":{"last_update":"2010-12-13
  7. 16:41:48","status":"1"}}},"server_array":[{"id":"1","name":"anes.yyy.net"},{
  8. "id":"2","name":"neseema.xxx.net"}],"service_array":[{"id":"5","name":"POP3"},
  9. {"id":"6","name":"Cpanel"},{"id":"3","name":"SMTP"}],"sort_by":"servername",
  10. "sort_order":"ASC","pagelinks":"","totrows":"2","offset":"0","limitvalue":"10",
  11. "rows_monitor":2,"current":"monitor","uri":false}
Friends How to Parse this and take the Results for further
processing in javascript.... I am waiting to hear from you
Soon..

Regards
Anes P.A
Dec 15 '10 #1
1 2622
If you recieve it as a string in JS from your server
you could try using the eval(variable); method, which will return JS object. or you could try the JSON.parse instead of eval.
Dec 16 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: brian.ackermann | last post by:
Hi, Can someone tell me what I'm doing wrong here? It makes sense to me, but fails to actually execute the code. I can't find anything on google, but maybe my search criteria are off. ...
10
by: Dwizz | last post by:
Hello, I really hope that someone can help me resolve my problem, I've been working on it for the past few days, to no avail. I have an asp:label which gets its value from the database, but what...
2
by: Paul | last post by:
Hi, I have an asp.net page that has a LinkButton w/ attribute "onclick" = "javascript confirm('hello world');" How do I pass the value of the OK button back to my asp .net page? I could, put the...
5
by: VB Programmer | last post by:
I have a javascript calculator. How do I pass the value of the calculator result to another ASPX page so that I can right some VB.NET against the value? Thanks!
8
by: Pavils Jurjans | last post by:
Hello, I have been developing an Ajax-style framework for couple of years now. Now I am reworking some parts of it. The problem was that I used to use JSON for JavaScript value...
3
by: jackchang1 | last post by:
Hi I want to develop a Java application to check the syntax of Javascript code and I am thinking about using Rhino. But I don't know where to start and there is no document for this. Has anybody...
4
by: IRC | last post by:
hey, i am pretty new on javascript as well as PHP, Hey, anyone can you help me, how to pass the javascript array value to php page......... i want to retrieve the values which are arrayed on...
1
by: vinodkus | last post by:
dear sir/madam I want to show javascript array value in asp combo. please help me or give me a proper link. Thanks in Advance. Bye
5
by: benoypaul | last post by:
Hi, I wish to know how to take value of input element file (<input type=file>) in javascript Thanks in advance
2
by: godkrishna | last post by:
Hi Guys.. I am new to javascript.. pls bare with me :) In my form, i have a table with two columns. first column has checkboxes and second has dropdown lists. On check of each check box.....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.