I have a variable which looks like this:
var d;
d = [{'category': 'Hourly Report','from_start_datetime': '2013','format': 'yyyy-mm-dd hh:ii:ss', 'id': 'dateRangeTo'}]
When I use console.log(d[0])
, it displays [
instead of the dictionary value I have. So I tried putting it in an array, but it ended up looking like this:
dd = ['[{'category': 'Hourly Report','from_start_datetime': '2013','format': 'yyyy-mm-dd hh:ii:ss', 'id': 'dateRangeTo'}]']
What I actually need is the dictionary itself and also I want to retrieve the value of category
within the dictionary. Any tips on how to achieve this?