Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>JSON Collapsed CountNew to Visual Studio Code? Get it now.
JSON Collapsed Count

JSON Collapsed Count

JavelDev

|
48 installs
| (1) | Free
Shows the count of elements in collapsed JSON objects and arrays
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

JSON Collapsed Count

A VS Code extension that shows the count of elements in JSON objects and arrays.

Features

  • Displays the number of items in arrays: [ ...3 items... ]
  • Shows the number of keys in objects: { ...5 keys... }
  • Works with both JSON and JSONC (JSON with comments) files
  • Option to show counts always or only when collapsed
  • Lightweight and fast

Usage

  1. Open a JSON or JSONC file in VS Code
  2. The count of elements will appear next to each object and array
  3. Optionally, configure to show counts only when sections are collapsed

Configuration

Setting Default Description
jsonCollapsedCount.showOnlyWhenCollapsed false When enabled, shows the count only when the section is collapsed. When disabled, always shows the count.

Example configuration

{
  "jsonCollapsedCount.showOnlyWhenCollapsed": true
}

Example

With showOnlyWhenCollapsed: false (default), you'll always see:

{
  "users": [
    // [ ...3 items... ]
    { "id": 1, "name": "John" },
    { "id": 2, "name": "Jane" },
    { "id": 3, "name": "Doe" }
  ]
}

With showOnlyWhenCollapsed: true, counts appear only on collapsed sections.

Installation

From VS Code Marketplace

  1. Open VS Code
  2. Go to Extensions (Ctrl+Shift+X)
  3. Search for "JSON Collapsed Count"
  4. Click Install

From VSIX file

  1. Download the .vsix file
  2. Open VS Code
  3. Go to Extensions (Ctrl+Shift+X)
  4. Click the ... menu → "Install from VSIX..."
  5. Select the downloaded file

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft