gpt4 book ai didi

javascript - 将数组转换为javascript中的格式化字符串

转载 作者:行者123 更新时间:2023-11-29 16:07:35 24 4
gpt4 key购买 nike

<分区>

我有一个数组元素

    [{
"x": 326,
"y": 176
}, {
"x": 244,
"y": 300
}, {
"x": 189,
"y": 420
}, {
"x": 154,
"y": 546
}, {
"x": 139,
"y": 679
}, {
"x": 152,
"y": 827
}, {
"x": 183,
"y": 954
}, {
"x": 230,
"y": 1088
}, {
"x": 291,
"y": 1217
}, {
"x": 365,
"y": 1333
}, {
"x": 446,
"y": 1417
}, {
"x": 554,
"y": 1469
}]

我想把它转换成这样的字符串

"{326,176},{244,300},{189,420},{154,546},{139,679},{152,827},{183,954},  {230,1088},{291,1217},{365,1333},{446,1417},{554,1469}"

我们如何在 javascript 中实现这一点..提前致谢..

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com