【发布时间】:2022-08-03 04:05:51
【问题描述】:
我有对象
{ labels: [\"city A\", \"city B\"], data: [\"Abc\", \"Bcd\"] };
我想将上面的对象转换为下面的 json 数组
[
{ labels: \"city A\", data: \"Abc\" },
{ labels: \"city B\", data: \"Bcd\" },
];
标签: javascript arrays json typescript