/*  */
function from_output_json(fitem){
	var o = {};
	var a = $(fitem).serializeArray();
	$.each(a, function() {
		var textname = this.name.replace("[]", "");
		if ((o[textname]) || o[textname] == '') {
			if (!o[textname].push) {
				o[textname] = [o[textname]];
			}
			o[textname].push(this.value || '');
		} else {
			o[textname] = this.value || '';
		}
	});
	return JSON.stringify(o);
}