Assign JSON object value to variable

I'm trying to extract a certain name/value pair from a JSON object & assign it to a variable.

A sample of my object

{"new":[{"id":"185","title":"new time","slug":"new-time","time":"1363641168","text":"all done","deletetime":null}]

I'm trying to assign the time to a timestamp variable for later use in my AngularJS app. Anyway that I attempt, it returns as undefined.

$scope.news = data.new["time"];

What is the correct way to access the value of time?

new is a keyword in JavaScript, so you won't be able to use it in your property access notation. Consider renaming the new element in your data to be 'newItems' or something.

"new" is an array, so the first item's time prop is:

data.new[0].time