ModelWorks logoModelWorks
JSON TransformObject

values

Return an object's values as an array

values

Returns an array containing the values of the current object, in insertion order.

Options

This operation takes no options; pass an empty object or omit options entirely.

Example

Input

JSON
{ "id": 1, "name": "Ada", "active": true }

Operation

JSON
{ "type": "values" }

Output

JSON
[1, "Ada", true]

In a Circuit Step

JSON
{
  "name": "extract_field_values",
  "description": "Pull just the values from the user object",
  "function": "circuit.core.transform.json",
  "input": {
    "source": "${{ user }}",
    "operations": [
      { "type": "values" }
    ]
  },
  "outputs": [
    {
      "name": "user_field_values",
      "description": "Array of field values on the user object",
      "value": "${{ extract_field_values.output.transformed_result }}"
    }
  ]
}

Notes & gotchas

  • Errors with values: expected object if the input is not an object.
  • Order matches the input key order.
  • Values can be of any JSON type, so the resulting array may be mixed-type — be careful before chaining operations like sort without a key.
On this page

On this page