{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "div",
  "children": [
    {
      "elmType": "div",
      "style": {
        "display": "flex",
        "flex-direction": "column",
        "margin-top": "2px",
        "margin-bottom": "2px"
      },
      "children": [
        {
          "elmType": "div",
          "children": [
            {
              "elmType": "div",
              "style": {
                "display": "flex",
                "flex-wrap": "wrap"
              },
              "children": [
                {
                  "elmType": "div",
                  "forEach": "_person in @currentField",
                  "style": {
                    "display": "=if(@currentField,'flex','none')",
                    "flex-direction": "row",
                    "align-items": "center",
                    "white-space": "nowrap",
                    "border-radius": "14px",
                    "margin": "4px"
                  },
                  "attributes": {
                    "class": "ms-bgColor-neutralLight ms-fontColor-neutralPrimary"
                  },
                  "defaultHoverField": "[$_person]",
                  "children": [
                    {
                      "elmType": "img",
                      "style": {
                        "width": "24px",
                        "height": "24px",
                        "border-radius": "50%"
                      },
                      "attributes": {
                        "src": "=getUserImage([$_person.email],'small')"
                      }
                    },
                    {
                      "elmType": "div",
                      "txtContent": "[$_person.title]",
                      "style": {
                        "padding-left": "6px",
                        "padding-right": "10px"
                      },
                      "attributes": {
                        "class": "ms-fontSize-s"
                      }
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "elmType": "div",
          "txtContent": "+ Assign to Me",
          "style": {
            "display": "=if(indexOf(@currentField.email,@me)>-1,'none','flex')",
            "align-items": "center",
            "margin": "3px",
            "cursor": "pointer"
          },
          "attributes": {
            "class": "ms-fontColor-themePrimary ms-fontColor-themeDarker--hover"
          },
          "customRowAction": {
            "action": "setValue",
            "actionInput": {
              "InternalNameOfPersonColumn": "=appendTo(@currentField.email,@me)"
            }
          }
        }
      ]
    }
  ]
}