Use hasOwnProperty when iterating array in json method

The check on line 24 of util.js was always failing because for-in on an array includes inherited properties (e.g. functions).