I found this snippet of code in my travels in researching JSON:
var array = typeof objArray != \'object\' ? JSON.parse(objArray) : objArray;
Just read it like this:
result = (condition) ? (true value) : (false value);
place what ever you like in the 3 operators.
As many has compared it to an IF.. THEN structure, so it is.