{"action":"created","issue":{"url":"https://api.github.com/repos/bazaarvoice/jolt/issues/543","repository_url":"https://api.github.com/repos/bazaarvoice/jolt","labels_url":"https://api.github.com/repos/bazaarvoice/jolt/issues/543/labels{/name}","comments_url":"https://api.github.com/repos/bazaarvoice/jolt/issues/543/comments","events_url":"https://api.github.com/repos/bazaarvoice/jolt/issues/543/events","html_url":"https://github.com/bazaarvoice/jolt/issues/543","id":308145972,"number":543,"title":"Replacing values","user":{"login":"criztovyl","id":2174918,"avatar_url":"https://avatars0.githubusercontent.com/u/2174918?v=4","gravatar_id":"","url":"https://api.github.com/users/criztovyl","html_url":"https://github.com/criztovyl","followers_url":"https://api.github.com/users/criztovyl/followers","following_url":"https://api.github.com/users/criztovyl/following{/other_user}","gists_url":"https://api.github.com/users/criztovyl/gists{/gist_id}","starred_url":"https://api.github.com/users/criztovyl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/criztovyl/subscriptions","organizations_url":"https://api.github.com/users/criztovyl/orgs","repos_url":"https://api.github.com/users/criztovyl/repos","events_url":"https://api.github.com/users/criztovyl/events{/privacy}","received_events_url":"https://api.github.com/users/criztovyl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-23T19:03:07Z","updated_at":"2018-03-24T03:20:00Z","closed_at":null,"author_association":"NONE","body":"Hello,\r\n\r\nwhile looking into #542, I naively tried the follwing spec to transform the data.\r\nBut Jolt does not produce any output any time soon, it seems like it hangs in an endless loop.\r\n\r\nData\r\n```json\r\n[\r\n    {\r\n        \"id\": \"One\",\r\n        \"subid\": [\"1.1\", \"1.2\"]\r\n    },\r\n    {\r\n        \"id\": \"Two\",\r\n        \"subid\": [\"2.1\", \"2.2\"]\r\n    }\r\n]\r\n```\r\n\r\nSpec\r\n```json\r\n[\r\n    {\r\n        \"operation\": \"shift\",\r\n        \"spec\": {\r\n            \"*\": {\r\n                \"subid\": {\r\n                    \"*\": {\r\n                        \"@2\": \"&-&3\",\r\n                        \"@0\": \"&-&3.&2\"\r\n                    }\r\n                }\r\n            }\r\n        }\r\n    },\r\n    {\r\n        \"operation\": \"shift\",\r\n        \"spec\": {\r\n            \"*\": \"[]\"\r\n        }\r\n    }\r\n]\r\n```\r\nExpected Output\r\n```json\r\n[ {\r\n  \"id\" : \"One\",\r\n  \"subid\" : \"1.1\"\r\n}, {\r\n  \"id\" : \"One\",\r\n  \"subid\" : \"1.2\"\r\n}, {\r\n  \"id\" : \"Two\",\r\n  \"subid\" : \"2.1\"\r\n}, {\r\n  \"id\" : \"Two\",\r\n  \"subid\" : \"2.2\"\r\n} ]\r\n```"},"comment":{"url":"https://api.github.com/repos/bazaarvoice/jolt/issues/comments/375842838","html_url":"https://github.com/bazaarvoice/jolt/issues/543#issuecomment-375842838","issue_url":"https://api.github.com/repos/bazaarvoice/jolt/issues/543","id":375842838,"user":{"login":"milosimpson","id":1203207,"avatar_url":"https://avatars0.githubusercontent.com/u/1203207?v=4","gravatar_id":"","url":"https://api.github.com/users/milosimpson","html_url":"https://github.com/milosimpson","followers_url":"https://api.github.com/users/milosimpson/followers","following_url":"https://api.github.com/users/milosimpson/following{/other_user}","gists_url":"https://api.github.com/users/milosimpson/gists{/gist_id}","starred_url":"https://api.github.com/users/milosimpson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milosimpson/subscriptions","organizations_url":"https://api.github.com/users/milosimpson/orgs","repos_url":"https://api.github.com/users/milosimpson/repos","events_url":"https://api.github.com/users/milosimpson/events{/privacy}","received_events_url":"https://api.github.com/users/milosimpson/received_events","type":"User","site_admin":false},"created_at":"2018-03-24T03:20:00Z","updated_at":"2018-03-24T03:20:00Z","author_association":"MEMBER","body":"\"it seems like it hangs in an endless loop.\"  -> yes, this can happen.\r\n\r\nIf you switch the ordering of the \"@\"s the transform will complete.   It's not right, but it completes.\r\n\r\n```\r\n            \"@0\": \"&-&3.&2\",\r\n            \"@2\": \"&-&3\"\r\n```\r\n"}}
{"actor":{"display_login":"milosimpson"}}