keys
ObjectReturns 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.
Syntax
keysUse cases
| Use case | Description | URL | |
|---|---|---|---|
| Inspect API response fields | See 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 breeds | The 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 fields | Discover 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 fields | Check how many fields an API returns in a single object. | https://httpip.es/api/pipe/fetch:https://jsonplaceholder.typicode.com/users/1|keys|count |