length
String / MiscReturns the length of an array, string, or object (number of keys). A non-destructive alternative to count — does not change the type of the result when chained.
Syntax
lengthUse cases
| Use case | Description | URL | |
|---|---|---|---|
| Array length without consuming it | Measure how many items are in an array. | https://httpip.es/api/pipe/fetch:https://api.github.com/users/octocat/repos|length | |
| Length of a post body | Check how many characters are in the body of a specific post. | https://httpip.es/api/pipe/fetch:https://jsonplaceholder.typicode.com/posts/1|get:body|length | |
| Length of a user name | Measure the character count of a user's name string. | https://httpip.es/api/pipe/fetch:https://jsonplaceholder.typicode.com/users/1|get:name|length | |
| Number of keys in an object | Count the fields in a single object without converting to an array first. | https://httpip.es/api/pipe/fetch:https://jsonplaceholder.typicode.com/users/1|length |