Difference between revisions of "Component: Object Helper ( Data)"
From Flowcode Help
Jump to navigationJump to search| Line 32: | Line 32: | ||
{{Fcfile|Web_Weather.fcsx|Web Weather Example}} | {{Fcfile|Web_Weather.fcsx|Web Weather Example}} | ||
| + | |||
| + | |||
==Macro reference== | ==Macro reference== | ||
| + | |||
| + | ===GetKeys=== | ||
| + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
| + | |- | ||
| + | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetKeys''' | ||
| + | |- | ||
| + | | colspan="2" | Returns a list of the JavaScript object's keys | ||
| + | |- | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE | ||
| + | | width="90%" | Object | ||
| + | |- | ||
| + | | colspan="2" | The JavaSctipt object | ||
| + | |- | ||
| + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-h32-icon.png]] - HANDLE | ||
| + | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
| + | |} | ||
| + | |||
===GetValue=== | ===GetValue=== | ||
| Line 93: | Line 114: | ||
|- | |- | ||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-h32-icon.png]] - HANDLE | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-h32-icon.png]] - HANDLE | ||
| + | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
| + | |} | ||
| + | |||
| + | |||
| + | ===ObjectToFloat=== | ||
| + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
| + | |- | ||
| + | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ObjectToFloat''' | ||
| + | |- | ||
| + | | colspan="2" | Converts an object to a floating point value | ||
| + | |- | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE | ||
| + | | width="90%" | Object | ||
| + | |- | ||
| + | | colspan="2" | The JavaScript object | ||
| + | |- | ||
| + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT | ||
| + | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
| + | |} | ||
| + | |||
| + | |||
| + | ===ObjectToInteger=== | ||
| + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
| + | |- | ||
| + | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ObjectToInteger''' | ||
| + | |- | ||
| + | | colspan="2" | Converts an object to an integer | ||
| + | |- | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE | ||
| + | | width="90%" | Object | ||
| + | |- | ||
| + | | colspan="2" | The JavaScript object | ||
| + | |- | ||
| + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s32-icon.png]] - LONG | ||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
| Line 130: | Line 189: | ||
| colspan="2" | The JavaScript object | | colspan="2" | The JavaScript object | ||
|- | |- | ||
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT |
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
Latest revision as of 15:07, 5 December 2023
| Author | MatrixTSL |
| Version | 0.1 |
| Category | Data |
Contents
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.
Macro reference
GetKeys
| GetKeys | |
| Returns a list of the JavaScript object's keys | |
| Object | |
| The JavaSctipt object | |
| Return | |
GetValue
| GetValue | |
| Gets the value for a key in a JavaScript object | |
| Object | |
| The JavaScript object | |
| sKey | |
| The key name | |
| Return | |
JSONToObject
| JSONToObject | |
| Converts a JSON string to a JavaScript object | |
| Text | |
| The JSON string to convert to a JavaScript object | |
| Return | |
NumberToObject
| NumberToObject | |
| Converts a number to a JavaScript object | |
| Var | |
| The number to convert to a JavaSctipt object | |
| Return | |
ObjectToFloat
| ObjectToFloat | |
| Converts an object to a floating point value | |
| Object | |
| The JavaScript object | |
| Return | |
ObjectToInteger
| ObjectToInteger | |
| Converts an object to an integer | |
| Object | |
| The JavaScript object | |
| Return | |
ObjectToJSON
| ObjectToJSON | |
| Converts an object to a JSON string | |
| Object | |
| The JavaScript object | |
| Return | |
ObjectToNumber
| ObjectToNumber | |
| Converts an object to a number | |
| Object | |
| The JavaScript object | |
| Return | |
ObjectToString
| ObjectToString | |
| Converts an object to a string | |
| Object | |
| The JavaScript object | |
| Return | |
SetValue
StringToObject
| StringToObject | |
| Converts a string to a JavaScript object | |
| Var | |
| The string to convert to a JavaScript object | |
| Return | |
Property reference
| Properties |