var output = [],
	component;

value.split(/\\n/).forEach(function (entry) {
	if (component = entry.match(/^\\[.+\\](.+)\\s(\\w+)$/)) {
		output.push({
			name: component[1],
			value: component[2]
		});
	}
});

return JSON.stringify(output);