Note: Using jq to transform JSON data.
-
Original Data from the REST API extension in Symphony CMS --> example-01.json
-
Clean-up original json data with jq from the command-line. --> example-02.json (cleaner JSON data)
cat example-01.json | jq '[.response.entry[] | {_type: "sermons", title: .title.value, date: .date.date.start._iso, scripture: .scripture.value, speaker: .["speaker-name"].value,audio: .["simplecast-url"].value}]' > example-02.json
- Clean-up original json data and convert to NDJSON --> example-02.ndjson
cat example-01.json | jq -c '.response.entry[] | {_type: "sermons", title: .title.value, date: .date.date.start._iso, scripture: .scripture.value, speaker: .["speaker-name"].value,audio: .["simplecast-url"].value}' > example-02.ndjson