◄ Назад к списку

concat Объединение двух массивов в один

Объединение двух массивов в один
Liquid
        
          

{% assign fruits = "apples, oranges, peaches, tomatoes" | split: ", " %}
{% assign vegetables = "broccoli, carrots, lettuce, tomatoes" | split: ", " %}

{% assign plants = fruits | concat: vegetables %}

=> ["apples","oranges","peaches","tomatoes","tomatoes","broccoli","carrots","lettuce","tomatoes"]

Продолжая пользоваться сайтом, вы
соглашаетесь с использованием cookie