ProxymanApp / ProxymanApp/Proxyman
JSON object empty array seems to be the same object in script
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 7k
- Forks
- 237
- PR merge metrics
- No merged PRs in 30d
Description
Description
JSON object empty array seems to be the same object in script, if you allocate a new array and push some objects, all the other empty array push the same objects
Steps to Reproduce
- response is JSON like
{
"a": [],
"b": { "bb": [] },
"c": "c"
}
- In script allocate a new array and push some objects like
repsonse.body.d = [];
response.body.d.push({key: 'value'});
Current Behavior
new response is like
{
"a": [ { "key": "value" } ],
"b": { "bb": [ { "key": "value" } ],
"c": "c",
"d": [ { "key": "value" } ]
}
Expected Behavior
{
"a": [],
"b": { "bb": [] },
"c": "c",
"d": [ { "key": "value" } ]
}
Environment
- App version: Proxyman 5.19.0
- macOS version: macOS Sequoia 15.3.1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the behavior with the JSON response and script in the issue, focusing on response.body array assignment and push operations. Trace the response-body scripting implementation to determine why empty arrays share inserted objects. Done means only d contains the pushed object while a and b.bb remain empty, with a regression test for nested empty arrays.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- desktop, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100