LogoLogo
  • Adapptio User Documentation
  • Getting Started
    • Quickstart
    • Architecture Overview
      • Views
      • Actions
      • Integrations
      • API Endpoints
      • Routes
      • Events
      • Assets
    • Editor
      • Main Menu
        • Create New Resources
        • Manage the Application
        • Monitoring Errors
      • Main Toolbar
        • Deploying the Application
        • Opening the Application
        • Preview Mode
        • Error Monitor
      • Components Panel
        • Components
        • Inspector
        • View Settings
      • Outline Panel
        • Data Variables
          • State Variable
          • Data From Action
      • Data Explorer
      • Console
    • Playground
  • Working with Adapptio
    • Best Practices
    • Tutorials
      • 1. Hello World
      • 2. Visualize Data from API
      • 3. Advanced Layout Application
      • 4. Application with In-Memory Database
    • How To
      • Custom Auth
      • Action Logic
        • Transform Node
      • UI Logic
        • Logout
        • Conditional Render
        • One Of
      • Data & Dynamic values
        • Custom Variable
        • Data from Action
        • Dynamic Value
        • Change Value from Event
        • Loading Data from Action to Form
        • Sending Data to Action from a Form
        • Server-side Dropdown Autocompletion
      • Visual
        • Styling Icon Button
      • Layouts
        • Centered Box
        • Header & Sidebar Layout
        • Grid Form Layout
        • Stretched Layout in Row
    • Components
      • Composed Chart
      • Advanced Table
      • Custom Component
    • Examples of Applications
      • SaaS Platforms
      • Customers Portals
      • Information Systems
      • Internal Tools
        • Color Picker
      • IoT Applications
      • Smart Portals
      • Analytics & Calculators
      • Statistics & Monitoring Panels
      • API Data Visualization
      • Simple Games
  • DEPLOYMENT
    • Cloud Hosted
    • Self Hosted
  • REFERENCE GUIDE
    • Components List
      • Application Header
      • Box
      • Container
      • Grid
      • Sidebar Layout
      • View
      • Text Input
      • Number
      • Checkbox
      • Option
      • Date and Time
      • File Upload
    • Properties
      • ACCEPT
      • CUSTOM PLACEHOLDER
      • DESCRIPTION
      • ENABLED
      • FONT SIZE
      • FOREGROUND COLOR
      • FORM DATA KEY
      • HEADERS
      • ICON
      • ID
      • LABEL
      • METHOD
      • MULTIPLE
      • MAX FILE SIZE
      • REQUEST TIMEOUT
      • REQUIRED
      • READ-ONLY
      • SIZE
      • TEXT ALIGNMENT
      • TEXT STYLE
      • URL
      • UPLOAD IMMEDIATELY
      • VALIDATE
      • VALUE
    • Functions
      • Array
      • Date
      • Generators
      • JSON
      • Logic
      • Math
      • Object
      • String
      • Types
      • Util
  • Support
    • Get in touch
    • Release Notes
  • Legal
    • Terms and Conditions
    • GDPR
Powered by GitBook
On this page
  • Get Object Keys
  • Set Object Key
  • Delete Object Key
  • Props to Array
  • Object from an Array

Was this helpful?

  1. REFERENCE GUIDE
  2. Functions

Object

Get Object Keys

Returns an array of object keys.

Expression:

OBJ_KEYS(value: map)

Return:

array

Example of usage:

OBJ_KEYS({key1: "apple", key2: "pear", key3: "tomatoes"})

Return value:
["key1","key2","key3"]

Set Object Key

Returns a map with a modified key value without changing a previous object.

Expression:

OBJ_SET_KEY(object: map, key: string, value: any)

Return:

newObject: map

Example of usage:

OBJ_SET_KEY({key1: "apple", key2: "pear", key3: "tomatoes"}, "key1", "jack fruit")

Return value:
{"key1":"jack fruit","key2":"pear","key3":"tomatoes"}

Delete Object Key

Returns a map with a deleted key value without changing a previous object.

Expression:

OBJ_DELETE_KEY(object: map, key: string)

Return:

newObject: map

Example of usage:

OBJ_DELETE_KEY({key1: "apple", key2: "pear", key3: "tomatoes"}, "key3")

Return value:
{"key1":"apple","key2":"pear"}

Props to Array

Returns a converted map to props to array without changing a previous object.

Expression:

PROPS_TO_ARRAY(value: map)

Return:

propsToArray: map

Example of usage:

PROPS_TO_ARRAY({key1: "apple", key2: "pear", key3: "tomatoes"})

Return value:
[
    {"key":"key1","value":"apple"},
    {"key":"key2","value":"pear"},
    {"key":"key3","value":"tomatoes"}
]

Object from an Array

Returns a created object from an array.

key, value are mandatory in an expression

Expression:

OBJ_FROM_ARRAY(value: array { key: string, value: string })

Return:

convertedObject: map

Example of usage:

OBJ_FROM_ARRAY([{ key: "myKey", value: "myValue" }])

Return value:
{"myKey":"myValue"}
PreviousMathNextString

Last updated 2 years ago

Was this helpful?