Knap.md
LogicFiltersVariablesAPIGitHub ↗

Guide

VariablesLogicFilters

Reference

API

Project

GitHub ↗npm ↗

merge

Append one or more values to an array.

Filters/merge

Syntax

{{ value | merge:"value" }}{{ value | merge:("a", "b") }}

Example

01

Basic usage

InputTS
1{2  "tags": [3    "notes",4    "ideas"5  ]6}
TemplateKNAP
1{{ tags | merge:"books" }}
OutputKNAP
1["notes","ideas","books"]

Related filters

uniqueRemove duplicate array items.
Previous← mapNextnth →
Knap is open source under the MIT license.View source ↗

On this page

SyntaxExamplesRelated filters
merge filter — Knap