Details
| ID | PrepareArcannaRawJson |
|---|---|
| Language | python |
| From Version | 5.5.0 |
| Docker Image | demisto/python3:3.10.14.98471 |
| Tags | Utility |
README
Transform a string into a json and escape it for Arcanna to use it in send_event
Output
| Path | Type | Description |
|---|---|---|
| JsonObject | String | specifies the type of Arcanna ML processor used |
import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 import json JSON_CONTEXT_KEY = "JsonObject" json_str = demisto.args()['input'] demisto.debug(json_str) obj = json.loads(json_str) if "_source" in obj: new_obj = obj["_source"] obj = new_obj objStr = json.dumps(obj) demisto.setContext(JSON_CONTEXT_KEY, objStr) demisto.results(objStr)