DataJet
Search…
concat
concat simply concatenates two arrays.
1
{% capture arr1 %}
2
[
3
{
4
"foo_1": "bar_1"
5
}
6
]
7
{% endcapture %}
8
9
{% assign arr1 = arr1 | parse %}
10
11
{% capture arr2 %}
12
[
13
{
14
"foo_2": "bar_2"
15
}
16
]
17
{% endcapture %}
18
19
{% assign arr2 = arr2 | parse %}
20
21
22
{% assign arr3 = arr1 | concat: arr2 %}
23
24
{{ arr3 | log }}
Copied!
Above would log this array of json objects:
1
[
2
{
3
"foo_1": "bar_1"
4
},
5
{
6
"foo_2": "bar_2"
7
}
8
]
Copied!
Last modified 11mo ago
Copy link