keys

Object

Returns an array of the keys of an object. Useful for inspecting an unknown API response structure or for getting a list of available field names.

Syntaxkeys

Use cases

Use caseDescriptionURL
Inspect API response fieldsSee every field name returned by an API before deciding which ones to pick.https://httpip.es/api/pipe/fetch:https://jsonplaceholder.typicode.com/posts/1|keys
List available dog breedsThe Dog CEO API wraps breeds in a message object — keys extracts the breed names.https://httpip.es/api/pipe/fetch:https://dog.ceo/api/breeds/list/all|get:message|keys
GitHub user profile fieldsDiscover all the top-level fields on a GitHub user object.https://httpip.es/api/pipe/fetch:https://api.github.com/users/octocat|keys
Count available fieldsCheck how many fields an API returns in a single object.https://httpip.es/api/pipe/fetch:https://jsonplaceholder.typicode.com/users/1|keys|count

All commands