Which is the easiest way to convert this:
[{src:\"websrv1\"}, {dst:\"websrv2\"}, {dstport:\"80\"}]
to this:
{src:\"websrv1\
If you are using jquery, try this:
var array = [{src:"websrv1"}, {dst:"websrv2"}, {dstport:"80"}] var arrayObj = {}; for(var i in array) { $.extend(arrayObj, array[i]); }