JSON Output Formatting?

a bit late on this, but with JSON, order isn’t important (general) as others have mentioned. If you need to return things in a certain order, then you’ll need to use an array in the JSON. Then the order is kept.

Normal Unordered JSON:

var oProblem = {
   "id" : "",
   "problem" :  "",
   "date_added" : "",
   "date_resolved" : ""
}

Array Ordered JSON:

var oProblem = [
   {"id" : ""},
   {"problem" :  ""},
   {"date_added" : ""},
   {"date_resolved" : ""}
]

So the ordered one is an array of objects/fields. Downside is it adds an extra level of nesting.