JavaScript

A5.u.array.objectto Method

Syntax

A5.u.array.object.to(properties,values)

Arguments

propertiesarray

The array of property names to use in the object.

valuesarray

The array of data to be converted.

Returns

objectobject

The resulting data object.

Description

Convert an array into an object.

Discussion

The A5.u.array.object.to method can convert an array of data into an object. Missing values will be output as null.

Example

var res = A5.u.array.object.to(['a','b','c'],[1,2]);
// res = {a: 1, b: 2, c: null}