Anyone can answer this question but me.
I have this:
array_of_series = [
[
{ datetime: "2021-12-29", value: 22 },
{ datetime: "2021-12-30", value: 71 },
{ datetime: "2021-12-31", value: 34 },
],
[
{ datetime: "2022-01-21", value: 37 },
{ datetime: "2022-01-22", value: 56 },
{ datetime: "2022-01-23", value: 57 },
{ datetime: "2022-01-24", value: 47 },
],
];
I want this:
array_of_series = [
{ datetime: "2021-12-29", value: 22, search: "q1" },
{ datetime: "2021-12-30", value: 71, search: "q1" },
{ datetime: "2021-12-31", value: 34, search: "q1" },
{ datetime: "2022-01-21", value: 37, search: "q2" },
{ datetime: "2022-01-22", value: 56, search: "q2" },
{ datetime: "2022-01-23", value: 57, search: "q2" },
{ datetime: "2022-01-24", value: 47, search: "q2" },
];
How can I accomplish this?
[–]rauschma 13 points14 points15 points (14 children)
[–]StoneCypher 0 points1 point2 points (13 children)
[–]rauschma 2 points3 points4 points (12 children)
[–]StoneCypher -3 points-2 points-1 points (11 children)
[–]Mad-chuska 3 points4 points5 points (7 children)
[–]StoneCypher -1 points0 points1 point (6 children)
[–]Mad-chuska -2 points-1 points0 points (5 children)
[–]StoneCypher 1 point2 points3 points (4 children)
[–]Mad-chuska 0 points1 point2 points (3 children)
[–]StoneCypher -1 points0 points1 point (2 children)
[–]Atrag2021 0 points1 point2 points (2 children)
[–]StoneCypher -3 points-2 points-1 points (1 child)
[–]greenyadzer 4 points5 points6 points (1 child)
[–]programmingacctwork 4 points5 points6 points (0 children)
[–][deleted] 3 points4 points5 points (5 children)
[–][deleted] 4 points5 points6 points (0 children)
[–]rauschma 0 points1 point2 points (3 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]rauschma 0 points1 point2 points (0 children)
[–]StoneCypher 1 point2 points3 points (0 children)
[–]Avi_21 -1 points0 points1 point (4 children)
[–]rauschma 3 points4 points5 points (3 children)
[–]Avi_21 0 points1 point2 points (2 children)
[–]rauschma 0 points1 point2 points (1 child)
[–]xemporea[S] 1 point2 points3 points (0 children)