Skip to content
Browse all functions

Get Keys and Values from JSON Object

data/getjsonkeysandvalues

getjsonkeysandvalues (Get Keys and Values from JSON Object) is a 1001fx API function in the group Data & JSON: POST https://api.1001fx.com/data/getjsonkeysandvalues, 1 credit per call. It works as a ready-made module in Make and n8n or as a plain HTTP call.

1 credit per callHTTP APIn8nMake

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

Try it in the 1001fx app

Run getjsonkeysandvalues in your browser with your API key – fill the form, click Run and get the answer or the file.

getjsonkeysandvalues in the 1001fx app: the form with example values
Get Keys and Values from JSON Object in the 1001fx app

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
Ask 1001fx