var s = '[ID1|text1|text2|text3|text4][ID2|text1|text2|text3|text4]';
var blocks = s.replace(/^\[|\]$/g, "").split("]["),
block, result = {};
for( var i = 0, length = blocks.length; i < length; i++ ) {
result[ (block = blocks[ i ].split("|")).shift() ] = block;
}
alert( JSON.stringify( result ) ); // {"ID1":["text1","text2","text3","text4"],"ID2":["text1","text2","text3","text4"]}