SP
entities = ["account", "device", "channel"]Как можно его превратить в
entities = [
{
value: "account",
label: "Account"
},
{
value: "device",
label: "Device"
},
{
value: "channel",
label: "Channel"
}
];
Size: a a a
SP
entities = ["account", "device", "channel"]Как можно его превратить в
entities = [
{
value: "account",
label: "Account"
},
{
value: "device",
label: "Device"
},
{
value: "channel",
label: "Channel"
}
];
Ф
Ф
L
entities = ["account", "device", "channel"]Как можно его превратить в
entities = [
{
value: "account",
label: "Account"
},
{
value: "device",
label: "Device"
},
{
value: "channel",
label: "Channel"
}
];
entities = ["account", "device", "channel"]
entities.map(value => ({
value,
label: value.replace(/^./, c => c.toUpperCase())
}))
Ф
АШ
entities = ["account", "device", "channel"]
entities.map(value => ({
value,
label: value.replace(/^./, c => c.toUpperCase())
}))
В
s
s
ГЗ
ГЗ
EE
ids = [1, 2, 3]
ages = [4, 5, 6]
Это const arr = [
{ id: 1, age: 4 },
{ id: 2, age: 5 },
{ id: 3, age: 6 },
]
AK
ids.map((item, index) => { ... })
EE
PM
ПЯ
PM
ПЯ
О
ПЯ