Hi!
I have been racking my brain for hours trying to get a JSON output.
After calling a CLI command using the Exec node, I get this string array:
"[↵ {↵ id: 'djtxrc3qclpy62pvpleh33vs',↵ createdAt: 2024-09-19T19:51:33.000Z,↵ title: null,↵ archived: false,↵ favourited: false,↵ taggingStatus: 'success',↵ note: null,↵ tags: [ 'youtube', 'Streaming Services', 'TV Shows' ],↵ content: {↵ type: 'link',↵ url: 'https://youtu.be/l4FgyRVik1Q?si=Cz05aPLTY3Znj1ZL',↵ title: 'video title',↵ description: 'videodescrip',↵ imageUrl: 'https://i.ytimg.com/vi/maxresdefault.jpg',↵ imageAssetId: 'd8737905-f785-4308-bf61-01bfa4568930',↵ screenshotAssetId: '73185ac1-1c86-4800-a9c3-3b8e3688caea',↵ favicon: 'https://www.youtube.com/s/desktop/img/favicon_144x144.png',↵ htmlContent: '<div id="r... <CROPPED>',↵ crawledAt: 2024-09-19T19:52:08.000Z↵ }↵ }↵]↵"
I am trying to:
- Turn this String Array into a JSON Array
- Grab the first entry in that array and output it into a JSON Object
- Extract the 'id' and 'url' fields and output them in its own JSON
I am struggling to properly get this into a JSON Array, any ideas?
TIA!