Returning a json object without square brackets
<p>I have a function which returns an object of form:
<code>[{"key":"name","value":"ali","key":"age","value":"56"}]</code> when called as given below. How can I have it return same kind of object but without the square brackets?</p>

<pre><code>setProperties('{"name":"ali","age":"56"}');

function setProperties(str) {
    var properties = [];
    var json = jQuery.parseJSON(str);
    for (property in json) {
      properties.push({
        key: property,
        value: json[property]});
    }
    return properties;
}
</code></pre>
