Lets say, I have two arrays:
Array1
from = ['2022-01-01', '2022-01-02', '2022-01-03', '2022-01-04']
And then array2:
to = ['2022-02-01', '2022-02-02', '2022-02-03', '2022-02-04']
Now by using the both, i need to create a combined structure array without changing the orders:
Lets say, the expected output is as follows:
output = [{'from': '2022-01-01', 'to': '2022-02-01'},
{'from': '2022-01-02', 'to': '2022-02-02'},
{'from': '2022-01-03', 'to': '2022-02-03'},
{'from': '2022-01-04', 'to': '2022-02-04'}]
The [0] of from should match [0] of to data. Likewise, how to convert the array ? Am yet to start and dont know where to start so i dont have any code to show. Please help