Objects

This function allows you to get the properties of specified object.

These functions are used when you need to get the properties of an objection in the function stack.

  • Get Keys - Get the property names of an object as an array.

  • Get Values - Get the property values of an object as an array.

  • Get Entries - Get the property entries of an object as an array

Examples

For each of these examples, we will create a variable called object with the value

{
   "a":"3",
   "b":"2",
   "c":"1"
}

Get Keys

Get the property names of an object as an array.

In the above example, the object is changed to an array

{
   "a",
   "b",
   "c"
}

Get Values

Get the property values of an object as an array.

In the above example, the object is changed to an array

{
   "3",
   "2",
   "1"
}

Get Entries

Get the property entries of an object as an array

In the above example, The object is changed to an array

[
   {
      "key":"a",
      "value":"3"
   },
   {
      "key":"b",
      "value":"2"
   },
   {
      "key":"c",
      "value":"1"
   }
]

Last updated