[英]Custom text editor
我想你想要這樣的東西來發送一個有效的 object 到后端
const txtArea = `test1 test2 test3; test1 test test3 test4 test1 test test3 test4` const obj = Object.entries(txtArea.split(';')).reduce((acc, [x, y]) => ({...acc, [x]: y }), {}) console.log(obj)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.