Predicate item check not completely matching item date

{
  "condition": "minecraft:entity_properties",
  "entity": "this",
  "predicate": {
    "equipment": {
      "mainhand": {
        "components": {
          "minecraft:custom_data": {
            "item_composer": {
              "click": {
                "right": {
                  "actions": {
                    "run_command": true
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

I currently have this predicate file which checks if an items custom data matches {item_composer:{click:{right:{actions:{run_command:true}}}}}. This works pretty well on its own but if any other key is present besides run_command it doesn't work. (for example an item with just {item_composer:{click:{right:{actions:{run_command:true}}}}} triggers the predicate, while one with {item_composer:{click:{right:{actions:{run_command:true,command:"blabla"}}}}} causes it to fail) Is there any way to check for a specific key while ignoring anything else present besides it?

Continue to help post