helper.entries2object

Creating an object from a specified array of key-value pairs.

For example, let's say you have an array like this:

[
  {
    "key": "foo",
    "value": "hello"
  },
  {
    "key": "bar",
    "value": "world"
  }
]

It is converted to an object whose elements consist of the values of the original array:

{ "foo": "hello", "bar": "world" }

View example in the sandbox.

Component properties

NameTypeDescription
type*"helper.entries2object"

Set component type

entriesarray

Source array of key-value pairs.

entries[]object

entries[].key*string

Key.

entries[].value*any

Value.