# For In Object

Iterate over object properties using lodash _.forIn

> Canonical page: https://elysiatools.com/en/tools/for-in-object

- **Category:** Data Processing

- **Keywords:** forIn, object, lodash, iterate, entries

## Overview

Iterate over own and inherited enumerable properties of an object.

**Highlights:**
- Uses lodash `_.forIn`
- Includes inherited enumerable properties
- Returns an ordered list of key/value entries

**Example:**
- Object: `{"a":1,"b":2}`
- Result: `[{"key":"a","value":1},{"key":"b","value":2}]`

## Inputs

- **Object** (textarea): Enter a JSON object

## When to use

- When you need to extract and list all enumerable properties from a complex JSON object.
- When you want to include both own and inherited properties in your data processing workflow.
- When you need to transform a nested object into a flat, readable array of entries for further analysis.

## How it works

- Paste your JSON object into the input area.
- The tool applies the lodash _.forIn function to traverse the object's properties.
- It automatically captures both own and inherited enumerable properties.
- The output is generated as an ordered list of key-value objects.

## Use cases

- Converting configuration objects into arrays for UI rendering.
- Debugging object structures by listing all available keys and their associated values.
- Preparing data for iteration-based logic in downstream applications.

## Frequently asked questions

### What does the For In Object tool do?

It iterates over all enumerable properties of a provided JSON object, including inherited ones, and returns them as an ordered list.

### Does it include inherited properties?

Yes, the tool uses lodash _.forIn, which iterates over both own and inherited enumerable properties.

### What is the output format?

The output is returned as an array of objects, where each object contains a 'key' and a 'value' field.

### Is this tool limited to own properties only?

No, unlike some native methods, this tool specifically includes inherited enumerable properties.

### Can I process large JSON objects?

Yes, the tool efficiently handles JSON objects by converting them into a structured list format.

## Related tools

- [Assign In Object](https://elysiatools.com/en/tools/assign-in-object): Assign own and inherited properties using lodash _.assignIn
- [Defaults Deep](https://elysiatools.com/en/tools/defaults-deep): Apply deep default values using lodash _.defaultsDeep
- [For Own](https://elysiatools.com/en/tools/for-own): Iterate over own object properties using lodash _.forOwn
- [Keys In List](https://elysiatools.com/en/tools/keys-in-list): List own and inherited keys using lodash _.keysIn
- [Keys List](https://elysiatools.com/en/tools/keys-list): List own enumerable keys using lodash _.keys
- [Count By](https://elysiatools.com/en/tools/count-by): Count items by a derived key using lodash _.countBy
- [Find Key](https://elysiatools.com/en/tools/find-key): Find the first matching key using lodash _.findKey
- [Get Path](https://elysiatools.com/en/tools/get-path): Get a value at a path using lodash _.get

## Samples

- [QR Code Samples](https://elysiatools.com/en/samples/qrcode-samples): Sample QR code images for testing QR code reading and generation tools
- [Grafana Advanced Application Samples](https://elysiatools.com/en/samples/grafana-samples): Comprehensive Grafana samples covering advanced dashboard design, alerting configurations, data source integrations, and plugin development
- [Distributed Tracing Samples](https://elysiatools.com/en/samples/distributed-tracing-samples): Comprehensive distributed tracing examples using Jaeger, OpenTelemetry, and other modern observability tools for microservices architecture
- [ELK Stack Log Analysis Samples](https://elysiatools.com/en/samples/elk-stack-samples): Comprehensive ELK Stack (Elasticsearch, Logstash, Kibana) samples for log aggregation, processing, and visualization in distributed systems

## Related content

- [JSON Interchange and Format Translation Tools](https://elysiatools.com/en/hubs/json-convert): Compare JSON conversion tools for CSV, YAML, TOML, GraphQL, XML, Markdown, Excel, BSON, EDN, and related structured formats in one hub.
- [JSON Inspection, Diff, and Transformation Tools](https://elysiatools.com/en/hubs/json-utility): Compare JSON formatting, diffing, path inspection, schema validation, merging, transformation, and export tools in one hub for API and data workflows.
- [JSON Schema, Mock Data, and API Fixture Generators](https://elysiatools.com/en/hubs/json-generate): Curated tools for JSON schema generation, mock payload building, and API fixture preparation in one hub.
- [JSON Formatting, Diff, and Normalization Tools](https://elysiatools.com/en/hubs/json-format): Compare JSON formatting, diffing, log review, config comparison, and data-normalization tools in one hub for readable and reviewable JSON workflows.
