Skip to content

Depth Control #19

@krishana7911

Description

@krishana7911

Plan:

  • Add a --depth flag to CLI.
  • Limit recursion based on user-defined depth.
  • Default to Infinity if no depth is provided.

Steps:

  1. Update cli.js and index.js to accept --depth as an argument.
    • Modify flattenJson:
    • Add a currentDepth tracker.
  2. Stop flattening when the defined depth is reached.

Example CLI usage

json-to-table-cli --file users.json --output table.md --depth 2

Challenges:

  • Ensuring partial objects display correctly.
  • Balancing performance when flattening large datasets.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestnested-jsonRelated to nested json

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions