jquery - Trying to access JSON Object using key -


this code stores json in var:

var analysed data = {   "wednesday": {     "others": {       "count": 1,       "response time": 234     },       "urgent": {       "count": 15,       "response time": 68     },       "normal": {       "count": 10,       "response time": 120     }   },     "thursday": {     "others": {       "count": 1,       "response time": 234     },       "urgent": {       "count": 15,       "responsetime": 68     },       "normal": {       "count": 10,       "responsetime": 120     }   },   "tuesday": {     "others": {       "count": 1,       "response time": 5     },       "urgent": {       "count": 15,       "response time": 68     },       "normal": {       "count": 10,       "response time": 120     }   } } 

question:

please suggest me ways access them using key. need response time each keyword normal. urgent, information.

i supposed achieve usingjquery , add response time avg.

if have json object in javascript can access keys , values:

$.each(myobject, function (key, val) {      // see key , value:     alert(key + ': ' + val.urgent.count);      // see keys each object:     $.each(object.keys(val), function (key, val) {         alert(key + ': ' + val);     }); }); 

Comments