Rules/Conditions/Reference Root Element of Json

Consider the log snippet from a rule executed as a result of a content item being published. I removed much of the Json post due since it’s not in the scope of the question.

I am working on fine grained conditions and need to know the proper syntax to access the “type” element that currently has the value of “PublicationPublished” in the example below.

In this example, event.type points to “Published”, but I need to capture, and place conditions upon the element pointed to PublicationPublished.

Thank you.
Craig

{
  "type": "PublicationPublished",
  "payload": {
    "$type": "EnrichedContentEvent",
    "type": "Published",
    "id": "c09f9e57-9a56-46fe-9316-52b299bd9212",
    "created": "2021-11-01T20:22:04Z",
    "lastModified": "2024-05-29T21:44:11Z",
    "createdBy": "",
    "lastModifiedBy": "subject:"
}

I think I found the answer, I can use the event.name element. I will leave open for just a bit in case anyone wants to add anything.

1 Like