Jump to content

Component: Array Helper ( Data): Difference between revisions

From Flowcode Help
m Text replacement - "width="10%" align="center" style="background-color:#D8C9D8;" align="center"" to "width="10%" align="center" class="mtx-class-macrohead""
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead""
 
(One intermediate revision by the same user not shown)
Line 41: Line 41:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ArrayAddValue'''
| width="90%" class="mtx-class-macrohead" | '''ArrayAddValue'''
|-
|-
| colspan="2" | Adds an element to a JavaScript array object.  Returns the new size of the array. 
| colspan="2" | Adds an element to a JavaScript array object.  Returns the new size of the array. 
Line 70: Line 70:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ArrayGetLength'''
| width="90%" class="mtx-class-macrohead" | '''ArrayGetLength'''
|-
|-
| colspan="2" | Gets the length of a JavaScript array object 
| colspan="2" | Gets the length of a JavaScript array object 
Line 89: Line 89:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ArrayGetValue'''
| width="90%" class="mtx-class-macrohead" | '''ArrayGetValue'''
|-
|-
| colspan="2" | Gets the value of an element in a JavaScript array object 
| colspan="2" | Gets the value of an element in a JavaScript array object 
Line 113: Line 113:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ArrayIndexOf'''
| width="90%" class="mtx-class-macrohead" | '''ArrayIndexOf'''
|-
|-
| colspan="2" | Gets the index of a value within a JavaScript array object 
| colspan="2" | Gets the index of a value within a JavaScript array object 
Line 142: Line 142:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ArrayParse'''
| width="90%" class="mtx-class-macrohead" | '''ArrayParse'''
|-
|-
| colspan="2" | Parse a JavaScript array object by calling the macro for each element in the array. 
| colspan="2" | Parse a JavaScript array object by calling the macro for each element in the array. 
Line 161: Line 161:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ArrayRemoveValues'''
| width="90%" class="mtx-class-macrohead" | '''ArrayRemoveValues'''
|-
|-
| colspan="2" | Removes elements from a JavaScript array object.  Returns the new size of the array. 
| colspan="2" | Removes elements from a JavaScript array object.  Returns the new size of the array. 
Line 190: Line 190:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ArraySetValue'''
| width="90%" class="mtx-class-macrohead" | '''ArraySetValue'''
|-
|-
| colspan="2" | Sets the value of an element in a JavaScript array object 
| colspan="2" | Sets the value of an element in a JavaScript array object 
Line 219: Line 219:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''IsArray'''
| width="90%" class="mtx-class-macrohead" | '''IsArray'''
|-
|-
| colspan="2" | Returns true if the JavaScript object is an array 
| colspan="2" | Returns true if the JavaScript object is an array 
Line 238: Line 238:
{| class="mtx-class-macrotable wikitable"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
| width="90%" class="mtx-class-macrohead" | '''Properties'''  
|-
|-
|-
|-

Latest revision as of 14:22, 13 July 2026

Author MatrixTSL
Version 0.1
Category Data


Array Helper component

Component designed to allow manipulation of Javascript arrays.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_WEBEXP_Array.fcsx

Please click here to view the component source code (Beta): FC_Comp_Source_WEBEXP_Array.fcsx

Detailed description

No detailed description exists yet for this component

Examples

Weather Example

Example program showcasing a number of components used together to collect data from a URL using fetch, before processing the data using the object helper and array helper components.

Web Weather Example


Macro reference

ArrayAddValue

ArrayAddValue
Adds an element to a JavaScript array object. Returns the new size of the array. 
- HANDLE Object
The JavaScript object 
- ULONG Index
The element index 
- HANDLE Element
The new element to add to the array 
- LONG Return


ArrayGetLength

ArrayGetLength
Gets the length of a JavaScript array object 
- HANDLE Object
The JavaScript object 
- LONG Return


ArrayGetValue

ArrayGetValue
Gets the value of an element in a JavaScript array object 
- HANDLE Object
The JavaScript object 
- ULONG Index
The element index 
- HANDLE Return


ArrayIndexOf

ArrayIndexOf
Gets the index of a value within a JavaScript array object 
- HANDLE Object
The JavaScript object 
- HANDLE Value
The value to look for within the array 
- INT Start
The index to start the search (use negative numbers to search backwards) 
- LONG Return


ArrayParse

ArrayParse
Parse a JavaScript array object by calling the macro for each element in the array. 
- HANDLE Object
The JavaScript object 
- VOID Return


ArrayRemoveValues

ArrayRemoveValues
Removes elements from a JavaScript array object. Returns the new size of the array. 
- HANDLE Object
The JavaScript object 
- ULONG Index
The element index 
- ULONG Count
The number of values to remove from the array 
- LONG Return


ArraySetValue

ArraySetValue
Sets the value of an element in a JavaScript array object 
- HANDLE Object
The JavaScript object 
- ULONG Index
The element index 
- HANDLE Value
The new value for the array element 
- VOID Return


IsArray

IsArray
Returns true if the JavaScript object is an array 
- HANDLE Object
The JavaScript object 
- BOOL Return


Property reference

Properties
ParseArray macro
Allows an easy way to parse an array element by element