Jump to content

Component: Object Helper ( Data): Difference between revisions

From Flowcode Help
No edit summary
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead""
 
(3 intermediate revisions by the same user not shown)
Line 38: Line 38:


===GetKeys===
===GetKeys===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[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;" | '''GetKeys'''
| width="90%" class="mtx-class-macrohead" | '''GetKeys'''
|-
|-
| colspan="2" | Returns a list of the JavaScript object's keys 
| colspan="2" | Returns a list of the JavaScript object's keys 
Line 57: Line 57:


===GetValue===
===GetValue===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[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;" | '''GetValue'''
| width="90%" class="mtx-class-macrohead" | '''GetValue'''
|-
|-
| colspan="2" | Gets the value for a key in a JavaScript object 
| colspan="2" | Gets the value for a key in a JavaScript object 
Line 81: Line 81:


===JSONToObject===
===JSONToObject===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[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;" | '''JSONToObject'''
| width="90%" class="mtx-class-macrohead" | '''JSONToObject'''
|-
|-
| colspan="2" | Converts a JSON string to a JavaScript object 
| colspan="2" | Converts a JSON string to a JavaScript object 
Line 100: Line 100:


===NumberToObject===
===NumberToObject===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[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;" | '''NumberToObject'''
| width="90%" class="mtx-class-macrohead" | '''NumberToObject'''
|-
|-
| colspan="2" | Converts a number to a JavaScript object 
| colspan="2" | Converts a number to a JavaScript object 
Line 119: Line 119:


===ObjectToFloat===
===ObjectToFloat===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[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;" | '''ObjectToFloat'''
| width="90%" class="mtx-class-macrohead" | '''ObjectToFloat'''
|-
|-
| colspan="2" | Converts an object to a floating point value 
| colspan="2" | Converts an object to a floating point value 
Line 138: Line 138:


===ObjectToInteger===
===ObjectToInteger===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[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;" | '''ObjectToInteger'''
| width="90%" class="mtx-class-macrohead" | '''ObjectToInteger'''
|-
|-
| colspan="2" | Converts an object to an integer 
| colspan="2" | Converts an object to an integer 
Line 157: Line 157:


===ObjectToJSON===
===ObjectToJSON===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[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;" | '''ObjectToJSON'''
| width="90%" class="mtx-class-macrohead" | '''ObjectToJSON'''
|-
|-
| colspan="2" | Converts an object to a JSON string 
| colspan="2" | Converts an object to a JSON string 
Line 176: Line 176:


===ObjectToNumber===
===ObjectToNumber===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[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;" | '''ObjectToNumber'''
| width="90%" class="mtx-class-macrohead" | '''ObjectToNumber'''
|-
|-
| colspan="2" | Converts an object to a number 
| colspan="2" | Converts an object to a number 
Line 195: Line 195:


===ObjectToString===
===ObjectToString===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[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;" | '''ObjectToString'''
| width="90%" class="mtx-class-macrohead" | '''ObjectToString'''
|-
|-
| colspan="2" | Converts an object to a string 
| colspan="2" | Converts an object to a string 
Line 214: Line 214:


===SetValue===
===SetValue===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[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;" | '''SetValue'''
| width="90%" class="mtx-class-macrohead" | '''SetValue'''
|-
|-
| colspan="2" | Sets the value of a key in a JavaScript object.  Returns true if the key already exists. 
| colspan="2" | Sets the value of a key in a JavaScript object.  Returns true if the key already exists. 
Line 243: Line 243:


===StringToObject===
===StringToObject===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[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;" | '''StringToObject'''
| width="90%" class="mtx-class-macrohead" | '''StringToObject'''
|-
|-
| colspan="2" | Converts a string to a JavaScript object 
| colspan="2" | Converts a string to a JavaScript object 
Line 263: Line 263:
==Property reference==
==Property reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| 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:23, 13 July 2026

Author MatrixTSL
Version 0.1
Category Data


Object Helper component

Component to help when dealing with Javascript objects.

Component Source Code

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

Please click here to view the component source code (Beta): FC_Comp_Source_WEBEXP_Object.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

GetKeys

GetKeys
Returns a list of the JavaScript object's keys 
- HANDLE Object
The JavaSctipt object 
- HANDLE Return


GetValue

GetValue
Gets the value for a key in a JavaScript object 
- HANDLE Object
The JavaScript object 
- STRING sKey
The key name 
- HANDLE Return


JSONToObject

JSONToObject
Converts a JSON string to a JavaScript object 
- STRING Text
The JSON string to convert to a JavaScript object 
- HANDLE Return


NumberToObject

NumberToObject
Converts a number to a JavaScript object 
- LONG Var
The number to convert to a JavaSctipt object 
- HANDLE Return


ObjectToFloat

ObjectToFloat
Converts an object to a floating point value 
- HANDLE Object
The JavaScript object 
- FLOAT Return


ObjectToInteger

ObjectToInteger
Converts an object to an integer 
- HANDLE Object
The JavaScript object 
- LONG Return


ObjectToJSON

ObjectToJSON
Converts an object to a JSON string 
- HANDLE Object
The JavaScript object 
- STRING Return


ObjectToNumber

ObjectToNumber
Converts an object to a number 
- HANDLE Object
The JavaScript object 
- FLOAT Return


ObjectToString

ObjectToString
Converts an object to a string 
- HANDLE Object
The JavaScript object 
- STRING Return


SetValue

SetValue
Sets the value of a key in a JavaScript object. Returns true if the key already exists. 
- HANDLE Object
The JavaScript object 
- STRING sKey
The key name 
- HANDLE Value
The value for the key 
- BOOL Return


StringToObject

StringToObject
Converts a string to a JavaScript object 
- STRING Var
The string to convert to a JavaScript object 
- HANDLE Return


Property reference

Properties