{"action":"opened","issue":{"url":"https://api.github.com/repos/bazaarvoice/jolt/issues/729","repository_url":"https://api.github.com/repos/bazaarvoice/jolt","labels_url":"https://api.github.com/repos/bazaarvoice/jolt/issues/729/labels{/name}","comments_url":"https://api.github.com/repos/bazaarvoice/jolt/issues/729/comments","events_url":"https://api.github.com/repos/bazaarvoice/jolt/issues/729/events","html_url":"https://github.com/bazaarvoice/jolt/issues/729","id":396007233,"node_id":"MDU6SXNzdWUzOTYwMDcyMzM=","number":729,"title":"Json Array to CSV Json array","user":{"login":"bnrs2006","id":46381851,"node_id":"MDQ6VXNlcjQ2MzgxODUx","avatar_url":"https://avatars1.githubusercontent.com/u/46381851?v=4","gravatar_id":"","url":"https://api.github.com/users/bnrs2006","html_url":"https://github.com/bnrs2006","followers_url":"https://api.github.com/users/bnrs2006/followers","following_url":"https://api.github.com/users/bnrs2006/following{/other_user}","gists_url":"https://api.github.com/users/bnrs2006/gists{/gist_id}","starred_url":"https://api.github.com/users/bnrs2006/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bnrs2006/subscriptions","organizations_url":"https://api.github.com/users/bnrs2006/orgs","repos_url":"https://api.github.com/users/bnrs2006/repos","events_url":"https://api.github.com/users/bnrs2006/events{/privacy}","received_events_url":"https://api.github.com/users/bnrs2006/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-01-04T17:33:38Z","updated_at":"2019-01-04T17:33:38Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nIm trying to convert a json to csv. Output I'm expecting is a valid json with array of comma separated values from my input  json. My json input has a definite structure but can contain any number of attributes within the json objects. Its a simple rows array. Each row has a columns object.\r\n\r\nEg. Input:\r\n\r\n{\r\n  \"rows\": [\r\n    {\r\n      \"columns\": {\r\n        \"startDate\": \"2018-12-22\",\r\n        \"endDate\": \"2018-12-24\",\r\n        \"month\": \"December\",\r\n        \"limits\": [\r\n          2000000,\r\n          \"null\"\r\n        ],\r\n        \"num_of_employers\": \"null\"\r\n      }\r\n    },\r\n    {\r\n      \"columns\": {\r\n        \"startDate\": \"2018-12-22\",\r\n        \"endDate\": \"2018-12-24\",\r\n        \"month\": \"December\",\r\n        \"limits\": [\r\n          1000000,\r\n          \"null\"\r\n        ],\r\n        \"num_of_employers\": 3000\r\n      }\r\n    }\r\n  ]\r\n}\r\n\r\nMy spec is able to get the headers and all the attribute values in array. But all are consolidated to single array. I want them in a 2d array rather than all in one .\r\n\r\nSpec:\r\n\r\n[\r\n  {\r\n    \"operation\": \"shift\",\r\n    \"spec\": {\r\n      \"rows\": {\r\n        \"0\": {\r\n          \"columns\": {\r\n            \"*\": {\r\n              \"$\": \"headers[]\",\r\n              \"@\": \"data[]\"\r\n            }\r\n          }\r\n        },\r\n        \"*\": {\r\n          \"columns\": {\r\n            \"*\": {\r\n              \"@\": \"data[]\"\r\n            }\r\n          }\r\n        }\r\n      }\r\n    }\r\n  }\r\n]\r\n\r\nCurrent Output:\r\n{\r\n  \"headers\" : [ \"startDate\", \"endDate\", \"month\", \"limits\", \"num_of_employers\" ],\r\n  \"data\" : [ \"2018-12-22\", \"2018-12-24\", \"December\", [ 2000000, \"null\" ], \"null\", \"2018-12-22\", \"2018-12-24\", \"December\", [ 1000000, \"null\" ], 3000 ]\r\n}\r\n\r\nExpected Output:\r\n\r\n{\r\n  \"headers\" : [ \"startDate\", \"endDate\", \"month\", \"limits\", \"num_of_employers\" ],\r\n  \"data\" : [ [\"2018-12-22\", \"2018-12-24\", \"December\", [ 2000000, \"null\" ], \"null\"], [\"2018-12-22\", \"2018-12-24\", \"December\", [ 1000000, \"null\" ], 3000 ]]\r\n}\r\n\r\nCan you help with the jolt spec?\r\n\r\nThankyou\r\n"}}
{"actor":{"display_login":"bnrs2006"}}