Flow Designer Parse JSON Response using new lines on Work Notes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2024 08:44 AM
I'm trying to parse the JSON Response from the API call with new lines and then update the work notes. It seems like during the test, the response is not being parsed as expected.
Anyone knows how to parse this correctly so the work notes can be updated correctly using the new lines?
JSON Response sample:
{"generated":"2023-12-15T21:03:05.550Z","reports":[{"scope":"THREAT","id":"48f4f8a0b2147eaf7f340c5820fe0e97de07aaefe7e57a915b216d20523da495","name":"48f4f8a0b2147eaf7f340c5820fe0e97de07aaefe7e57a915b216d20523da495","threatStatus":"active","forensics":[{"type":"attachment","display":"Image Based TOAD Threat with SHA-256: 48f4f8a0b2147eaf7f340c5820fe0e97de07aaefe7e57a915b216d20523da495","engine":"iee","malicious":true,"note":"Attachment with SHA-256: 48f4f8a0b2147eaf7f340c5820fe0e97de07aaefe7e57a915b216d20523da495","time":0,"what":{"rule":"14ab0a31-307e-11ed-afa2-1866da63294b","sha256":"48f4f8a0b2147eaf7f340c5820fe0e97de07aaefe7e57a915b216d20523da495","blacklisted":true},"platforms":[{"name":"analyst","os":"analyst","version":"0"}]}]}]}
Sample code:
var format = sentences.join (',\n');
- Labels:
-
flow designer

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2024 05:13 PM
I think if your output type in flow is JSON, then you don't need to use "JSON.parse"
Try in that way.
Thanks,
Narsing