Q:

Obtain value from JSON variable inside javascript

How to obtain value from JSON element being created dynamically.  Example below.  I was wondering if there is way to get the value from previous element 'top' using some javascript. ( Please update the title if its incorrect or misleading)
Following this example on jsfiddle 
var info = [
{
  src: "http://dummyimage.com/55x80/0d0.png/fff",
  pos: {
    top: 93,
    left: 70
  },
  rotate: -10,
  zIndex: 3
},
{
  src: "http://dummyimage.com/55x80/d00.png/fff",
  pos: {
    top: previousElement(top) + some dynamic value added at run time,
    left: 70
  },
  rotate: 0,
 zIndex: 2
},
]

A:

I wouldn't do this, you can calculate it as you go based on the index. 
But... if you insist:
Assuming your array is a JS literal (and not JSON, which is different) you can use a simple counter. 
Using the fact assignment returns the assigned value (this is kind of ugly though):
var top = 93;
var info = [
{
  src: "http://dummyimage.com/55x80/0d0.png/fff",
  pos: {
    top: top,
    left: 70
  },
  rotate: -10,
  zIndex: 3
},
{
  src: "http://dummyimage.com/55x80/d00.png/fff",
  pos: {
    top: top = top + (some dynamic value added at run time),
    left: 70
  },
  rotate: 0,
 zIndex: 2
}          //... keep doing top = top + sometDynamicValue on all elements
]

A more isolated example might be:
var c = 0,    
    arr = [
       {a:c = c + 5},
       {a:c = c + 5},
       {a:c = c + 5},
       {a:c = c + 5},
       {a:c = c + 5},
    ]

Which creates an array of objects with an increasing by 5 a property.