Answer the question
In order to leave comments, you need to log in
How to make a filter in a loop in nunjucks?
There is an array of objects in which categories are passed
{% set categories = [
{
"id": 1,
"slug": "shheben",
"name": "Щебень",
"parent": ""
}, {
"id": 2,
"slug": "pesok",
"name": "Песок",
"parent": ""
}, {
"id": 3,
"slug": "grunt",
"name": "Грунт",
"parent": ""
} ...........
] %}
{% set indexCat = [1, 2, 3, 4] %}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question