Skip to content
Browse all functions

Get Keys and Values from JSON Object

data/getjsonkeysandvalues

Returns two arrays. One containing the keys and on containing the values of the object.

Endpoint

POSThttps://api.1001fx.com/data/getjsonkeysandvalues
Header
X-API-KEY: YOURSECRETAPIKEY How to
Content type
application/json

Parameters

  • jsonobjectoptional

    JSON object

  • jsonStringstringoptional

    Stringified JSON

    Example:
    {"foundation":"Mozilla","model":"box","week":45,"transport":"car","month":7}

Examples

Get keys and values

Returns one array with keys and one array with values

Input

Expects a json body
{
  "json": {
    "foundation": "Mozilla",
    "model": "box",
    "week": 45,
    "transport": "car",
    "month": 7
  }
}

Output · HTTP 200

Response
{
  "result": {
    "keys": [
      "foundation",
      "model",
      "week",
      "transport",
      "month"
    ],
    "values": [
      "Mozilla",
      "box",
      45,
      "car",
      7
    ]
  }
}
Show curl command
curl -X POST 'https://api.1001fx.com/data/getjsonkeysandvalues' \
  -H 'X-API-KEY: YOURSECRETAPIKEY' \
  -H 'Content-Type: application/json' \
  -d '{"json":{"foundation":"Mozilla","model":"box","week":45,"transport":"car","month":7}}'

Try getjsonkeysandvalues now

Run it in your browser or create a free account and get 100 credits every month.

Changelog

  • 1.0.001.03.2023created