'[1,2],[3,4]'转[1,2],[3,4]

let a='[1,2],[3,4]'
let b='[1,2],[3,4]'.replaceAll('],',']#')  //'[1,2]#[3,4]'
let c='[1,2],[3,4]'.replaceAll('],',']#').split('#')  //["[1,2]", "[3,4]"]
let d='[1,2],[3,4]'.replaceAll('],',']#').split('#').map(item => item.replaceAll('[','').replaceAll(']','').split(',') )
image.png

你可能感兴趣的:('[1,2],[3,4]'转[1,2],[3,4])