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