Key Facts
- Category
- Data Processing
- Input Types
- textarea
- Output Type
- text
- Sample Coverage
- 4
- API Ready
- Yes
Overview
The Keys In List tool allows you to extract all enumerable property names from a JSON object, including both its own properties and those inherited through the prototype chain.
When to Use
- •When you need to inspect the full structure of an object including inherited properties.
- •When debugging JavaScript objects to verify which keys are accessible via the prototype chain.
- •When you need a clean JSON array of all available keys for further data processing.
How It Works
- •Paste your JSON object into the input field.
- •The tool processes the input using the lodash _.keysIn method.
- •It identifies all own and inherited enumerable keys.
- •The tool outputs a formatted JSON array containing all discovered keys.
Use Cases
Examples
1. Extracting Prototype Keys
Frontend Developer- Background
- A developer is working with a custom class instance and needs to verify all accessible properties, including those inherited from a base class.
- Problem
- Standard object inspection only shows own properties, hiding inherited functionality.
- How to Use
- Paste the object representation into the input field to generate the full list of keys.
- Example Config
-
{"name": "Device", "type": "Sensor"} - Outcome
- Returns a JSON array: ["name", "type"] plus any additional keys inherited from the object's prototype.
Try with Samples
jsonRelated Hubs
FAQ
What is the difference between this and Object.keys?
Object.keys only returns an object's own enumerable properties, whereas this tool uses _.keysIn to include inherited enumerable properties as well.
Does this tool support nested objects?
The tool processes the top-level object provided in the input. Nested objects will be treated as values associated with their respective keys.
What happens if the input is not valid JSON?
The tool requires valid JSON input to function correctly; invalid syntax will result in an error.
Are non-enumerable properties included?
No, this tool only lists enumerable properties as per the behavior of lodash _.keysIn.
Is the output sorted?
The output is returned as a JSON array of strings representing the keys found in the object.