Skip to Main Content
InterSystems Ideas

Have an idea, suggestion, or something that doesn’t work as expected in InterSystems products or services? Share it here on the InterSystems Ideas Portal.

The Ideas Portal is where community members can propose improvements, report bugs, and help influence the product roadmap across InterSystems products and the overall developer experience. 22% of submitted ideas are implemented by InterSystems or members of the Developer Community.

💡 Ideas and bugs are both welcome, no matter how big or small. You can submit feature requests, usability improvements, workflow suggestions, and bug reports. Whether you’re an experienced expert or just getting started, your fresh perspective is valuable.

🛠️ About bugs and fixes. If you have access to InterSystems WRC, please submit bugs there for immediate action. Bug reports submitted through the Ideas Portal are reviewed and tracked, but do not guarantee immediate resolution.

Start by sharing what could be better - the community and our teams will help take it from there.

Status Needs review
Created by Ashok Kumar T
Created on Dec 19, 2024

Add %ConstructClone or Copy method in Dynamic Object and arrays

Currently we don't have option to clone the JSON object or array. Whenever I set the JSON object to another variable and execute the %Remove() or %Pop() method to in any of the object it impacts other(s) due to in memory same object reference.

Add %ConstructClone() method would be useful.


  • ADMIN RESPONSE
    Dec 19, 2024

    Thank you for submitting the idea. The status has been changed to "Needs review".

    Stay tuned!

  • Jani Hurskainen
    Dec 23, 2024

    There is no explicit clone method but the deep cloning can be effectively achieved by:

    NS>set json1 = {"foo":1}
    NS>set json2 = {}.%FromJSON(json1.%ToJSON())
    NS>zwrite
    json1=<OBJECT REFERENCE>[9@%Library.DynamicObject]
    json2=<OBJECT REFERENCE>[64@%Library.DynamicObject]