Need json code to get both the array and nonarray values

Posted by Prabu_Spark under Web Services, Remoting on 10/24/2013 | Points: 10 | Views : 1057 | Status : [Member] | Replies : 1
Hi sir,
I Need json code to get both the array and nonarray values like below. Please give me the code to learn. I tried one code but i am getting only array values, i dont know how to get both the array and non array values. Kindly give me the solution for this problem.


{
"products": [
{
"pid": "1",
"name": "iPhone 4S",
"price": "300.00",
"created_at": "2012-04-29 02:04:02",
"updated_at": "0000-00-00 00:00:00"
},
{
"pid": "2",
"name": "Macbook Pro",
"price": "600.00",
"created_at": "2012-04-29 02:04:51",
"updated_at": "0000-00-00 00:00:00"
},
{
"pid": "3",
"name": "Macbook Air",
"price": "800.00",
"created_at": "2012-04-29 02:05:57",
"updated_at": "0000-00-00 00:00:00"
},
{
"pid": "4",
"name": "OS X Lion",
"price": "100.00",
"created_at": "2012-04-29 02:07:14",
"updated_at": "0000-00-00 00:00:00"
}
],
"success": 1
}

With regards,
J.Prabu.
[Email:prbspark@gmail.com]



Responses

Posted by: Bandi on: 10/24/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down
Refer this link
http://stackoverflow.com/questions/15219435/jquery-get-data-from-json-array
http://stackoverflow.com/questions/18910957/get-json-arrays-values-in-a-javascript-function

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Prabu_Spark, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response