I have 2 list of maps like
payload1 = [
{
'series': 'abc',
'value' : 123,
'date' : '2020-06-22'
}, {
'series': 'efg',
'value' : 789,
'date' : '2020-06-21'
} ]
and
payload2 = [
{
'series': 'xyz',
'value' : 234,
'date' : '2020-06-22'
}, {
'series': 'tuv',
'value' : 23442,
'date' : '2020-06-21'
} ]
How can I genrate a new list of map like
payload = [
{
'series': 'abc',
'value' : 123,
'date' : '2020-06-22'
}, {
'series': 'efg',
'value' : 789,
'date' : '2020-06-21'
}, {
'series': 'xyz',
'value' : 234,
'date' : '2020-06-22'
}, {
'series': 'tuv',
'value' : 23442,
'date' : '2020-06-21'
} ]
Basically i need to concatenate 2 list of maps to create a new one. is there any way to do this with less iteration??
const payload = [...payload1, ...payload2]?