payload: {"action":"created","issue":{"url":"https://api.github.com/repos/intuit/karate/issues/708","repository_url":"https://api.github.com/repos/intuit/karate","labels_url":"https://api.github.com/repos/intuit/karate/issues/708/labels{/name}","comments_url":"https://api.github.com/repos/intuit/karate/issues/708/comments","events_url":"https://api.github.com/repos/intuit/karate/issues/708/events","html_url":"https://github.com/intuit/karate/issues/708","id":426641648,"node_id":"MDU6SXNzdWU0MjY2NDE2NDg=","number":708,"title":"copy command does not make a deep copy of json","user":{"login":"viperx77","id":121118,"node_id":"MDQ6VXNlcjEyMTExOA==","avatar_url":"https://avatars1.githubusercontent.com/u/121118?v=4","gravatar_id":"","url":"https://api.github.com/users/viperx77","html_url":"https://github.com/viperx77","followers_url":"https://api.github.com/users/viperx77/followers","following_url":"https://api.github.com/users/viperx77/following{/other_user}","gists_url":"https://api.github.com/users/viperx77/gists{/gist_id}","starred_url":"https://api.github.com/users/viperx77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viperx77/subscriptions","organizations_url":"https://api.github.com/users/viperx77/orgs","repos_url":"https://api.github.com/users/viperx77/repos","events_url":"https://api.github.com/users/viperx77/events{/privacy}","received_events_url":"https://api.github.com/users/viperx77/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-03-28T18:18:44Z","updated_at":"2019-03-29T09:50:18Z","closed_at":null,"author_association":"NONE","body":"I am trying to reuse results from calls to verify multiple responses against a history API. I am unable to reuse the responses returned from calls due to deep Map references.\r\n\r\nI would expect the following to pass:\r\n\r\n```\r\nFeature: dev\r\n\r\n  @one\r\n  Scenario: one\r\n    * def root = { name: { name: 'inner' } }\r\n\r\n  Scenario: two\r\n    * def temp = call read('dev.feature@one')\r\n    * def a = temp.root\r\n    * copy b = a\r\n    * set b.name.name = \"copy\"\r\n    * match b.name.name == \"copy\"\r\n    * match a.name.name == \"inner\"\r\n\r\n```\r\n\r\nbut it fails with:\r\n\r\n> dev.feature:13 - path: $.name.name, actual: 'copy', expected: 'inner', reason: not equal\r\n\r\nThis is a follow up to [this stackoverflow question](https://stackoverflow.com/questions/55377162/how-to-make-a-copy-of-the-result-of-a-call/55377608?noredirect=1#comment97481644_55377608)"},"comment":{"url":"https://api.github.com/repos/intuit/karate/issues/comments/477936296","html_url":"https://github.com/intuit/karate/issues/708#issuecomment-477936296","issue_url":"https://api.github.com/repos/intuit/karate/issues/708","id":477936296,"node_id":"MDEyOklzc3VlQ29tbWVudDQ3NzkzNjI5Ng==","user":{"login":"MercierAdrien","id":45945867,"node_id":"MDQ6VXNlcjQ1OTQ1ODY3","avatar_url":"https://avatars1.githubusercontent.com/u/45945867?v=4","gravatar_id":"","url":"https://api.github.com/users/MercierAdrien","html_url":"https://github.com/MercierAdrien","followers_url":"https://api.github.com/users/MercierAdrien/followers","following_url":"https://api.github.com/users/MercierAdrien/following{/other_user}","gists_url":"https://api.github.com/users/MercierAdrien/gists{/gist_id}","starred_url":"https://api.github.com/users/MercierAdrien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MercierAdrien/subscriptions","organizations_url":"https://api.github.com/users/MercierAdrien/orgs","repos_url":"https://api.github.com/users/MercierAdrien/repos","events_url":"https://api.github.com/users/MercierAdrien/events{/privacy}","received_events_url":"https://api.github.com/users/MercierAdrien/received_events","type":"User","site_admin":false},"created_at":"2019-03-29T09:50:18Z","updated_at":"2019-03-29T09:50:18Z","author_association":"NONE","body":"This works : \r\n```\r\nFeature: dev\r\n\r\n    @one\r\n    Scenario: one\r\n        * def root = { name: { name: 'inner' } }\r\n\r\n    Scenario: two\r\n        * def temp = call read('dev.feature@one')\r\n        * def a = temp.root\r\n        * copy b = a\r\n        * set b.name = { name: \"copy\" }\r\n        * match b.name.name == \"copy\"\r\n        * match a.name.name == \"inner\"\r\n```\r\nI believe the `{ name: 'inner' }` object is not copied but simply referenced because of the interaction with the call (what you posted is working if you do all of that in the same scenario)."}}
other: {"actor":{"display_login":"MercierAdrien"}}