please help me

how to use
---------var data = new dhx.DataCollection({});data.load(“data/friends.json”);-----
transform data to string

You want to get data of collection as json string ?

var str = data.serialize();

I have resolved the problem,very thank you。

function JSONArrayToString(JSONArrayObject) {
var tmp = “”;
for ( var i = 0; i < JSONArrayObject.length; i++) {
if (i != JSONArrayObject.length - 1) {
var li = json2str(JSONArrayObject[i]) + “,”;
tmp += li;
} else {
var li = json2str(JSONArrayObject[i]);
tmp += li;
}
}
tmp = “[” + tmp + “]”;
function json2str(o) {
var arr = [];
var fmt = function(s) {
if (typeof s == ‘object’ && s != null)
return json2str(s);
return /^(string|number)$/.test(typeof s) ? “’” + s + “’” : s;
}
for ( var i in o)
arr.push("’" + i + “’:” + fmt(o[i]));
return ‘{’ + arr.join(’,’) + ‘}’;
}
return tmp;
}

this is my method.