[PR #5461] [CLOSED] Feature: Postman-Style Nested Environment Variables #5222

Closed
opened 2026-03-17 02:41:29 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/5461
Author: @Sambhram1
Created: 10/7/2025
Status: Closed

Base: mainHead: ftr-7


📝 Commits (2)

📊 Changes

7 files changed (+914 additions, -16 deletions)

View changed files

IMPLEMENTATION_PLAN.md (+137 -0)
NESTED_ENVIRONMENT_VARIABLES.md (+179 -0)
📝 packages/hoppscotch-data/src/environment/index.ts (+182 -8)
packages/hoppscotch-data/src/environment/nested-parser.ts (+233 -0)
packages/hoppscotch-data/src/environment/test-nested-vars.ts (+113 -0)
📝 packages/hoppscotch-js-sandbox/src/bootstrap-code/post-request.js (+35 -4)
📝 packages/hoppscotch-js-sandbox/src/bootstrap-code/pre-request.js (+35 -4)

📄 Description

This PR implements Postman-style nested environment variables in Hoppscotch, enabling dynamic variable key construction like {{ {{country-code}}{{environment}} }}. This addresses a critical user need where maintaining 450+ separate environments is now reduced to 15 dynamic variables in a single environment configuration.

🎯 Problem Solved
User Pain Point: Postman supports nested environment variables like {{ {{country-code}}{{environment}} }} but Hoppscotch doesn't. This limitation forces users to create hundreds of separate environments instead of using dynamic templating, significantly reducing productivity and increasing configuration complexity.

Before: 450+ separate environments
After: 15 dynamic variables in 1 environment

Features Added
🔄 Dual Syntax Support
Existing Hoppscotch: <> (fully backward compatible)
NEW Postman Style: {{variable}}
Mixed Syntax: <<{{country}}>> or {{<>}}


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/5461 **Author:** [@Sambhram1](https://github.com/Sambhram1) **Created:** 10/7/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `ftr-7` --- ### 📝 Commits (2) - [`8c0e34f`](https://github.com/hoppscotch/hoppscotch/commit/8c0e34f9f2e45aa786786db6e9fd3b723ac9a8d9) ftr-7 - [`382eb7e`](https://github.com/hoppscotch/hoppscotch/commit/382eb7e658a92bf741876d1cbd42d03075625c99) Merge branch 'main' into ftr-7 ### 📊 Changes **7 files changed** (+914 additions, -16 deletions) <details> <summary>View changed files</summary> ➕ `IMPLEMENTATION_PLAN.md` (+137 -0) ➕ `NESTED_ENVIRONMENT_VARIABLES.md` (+179 -0) 📝 `packages/hoppscotch-data/src/environment/index.ts` (+182 -8) ➕ `packages/hoppscotch-data/src/environment/nested-parser.ts` (+233 -0) ➕ `packages/hoppscotch-data/src/environment/test-nested-vars.ts` (+113 -0) 📝 `packages/hoppscotch-js-sandbox/src/bootstrap-code/post-request.js` (+35 -4) 📝 `packages/hoppscotch-js-sandbox/src/bootstrap-code/pre-request.js` (+35 -4) </details> ### 📄 Description This PR implements Postman-style nested environment variables in Hoppscotch, enabling dynamic variable key construction like {{ {{country-code}}{{environment}} }}. This addresses a critical user need where maintaining 450+ separate environments is now reduced to 15 dynamic variables in a single environment configuration. 🎯 Problem Solved User Pain Point: Postman supports nested environment variables like {{ {{country-code}}{{environment}} }} but Hoppscotch doesn't. This limitation forces users to create hundreds of separate environments instead of using dynamic templating, significantly reducing productivity and increasing configuration complexity. Before: 450+ separate environments After: 15 dynamic variables in 1 environment ✨ Features Added 🔄 Dual Syntax Support Existing Hoppscotch: <<variable>> (fully backward compatible) NEW Postman Style: {{variable}} Mixed Syntax: <<{{country}}>> or {{<<region>>}} --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 02:41:29 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#5222
No description provided.