Manipulation Filters

For all examples of these filters we will use the same Object: { "a":"1", "b":"2", "c":"3" }

entries: Get the property entries of an object as an array of key/value pairs.

get: Returns the value of an object at the specified path, the path is the key of each pair, in this example, the path could be: a, b, or c.

In this example, we apply the get filter with the path of a and the variable becomes 1.

has: Returns the existence of whether or not something is present in the object at the specified path, the path is the key of each pair, in this example the path could be: a, b, or c. This filter returns a value of true or false.

In this example, we apply the has filter with the path of c and the variable becomes true.

keys: Get the property keys of an object as an Array.

In this example, we apply the keys filter with the path of c and the variable becomes an array of [ "a", "b", "c"]

set: Sets a value at the path within the object and returns the updated object.

In this example, we use the set filter to create an object { "a":"1", "b":"2", "c":"3" }.

unset: Removes a value at the path within the object and returns the updated object.

In this example, we use the unset filter to create an object { "a":"1", "c":"3" }.

values: Get the property values of an object as an Array:

In this example, we apply the values filter with the path of c and the variable becomes an Array of [ "1", "2", "3"].