FormatContentData

This script formats the value given input from a JSON list into table.

python · XSOAR Content Update Notifications

Source

import demistomock as demisto  # noqa: F401
from CommonServerPython import *  # noqa: F401

args = demisto.args()
value = args.get("value", "")
try:
    value = json.loads(value)
except Exception as err:
    return_error(err)

returned_data = ""

if value:
    for v in value:
        description = v.get("changelog", {}).get(v.get("itemVersion"), {}).get("releaseNotes", "")
        returned_data += f"_____\n### {v.get('name')} (version {v.get('itemVersion')})\n_____\n\n{description}\n\n"

demisto.results(returned_data)

README

Script Data


Name Description
Script Type python3
Tags transformer, general

Inputs


Argument Name Description
value  

Outputs


There are no outputs for this script.