Child pages
  • fluid.arrayToHash

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Div
classapi-page

fluid.arrayToHash(array)

Section
Column
width70%

Converts an array of strings into a map where the keys are the strings and the value is true.

Code Block
javascript
javascript
bgColorwhite
borderStylenonejavascript
fluid.arrayToHash(array);

File name: fluidRenderer.js

Parameters

Span
classborderless-table

array

(Array) Array of strings to convert into a hash map

Return Value

Span
classborderless-table

Value

description

Column
width5%

Column

See Also


Example

Code Block
javascript
javascript
var elementList = ["div", "tr", "li"];
var map = fluid.arrayToHash(elementList);

In this example, map will result as:

Code Block
javascript
javascript
bgColorwhite
borderStylenonejavascript
{
      div: true,
      tr: true,
      li: true
}