{
   "if": {
      "anyOf": [
         {
            "allOf": [
               {
                  "field": "type",
                  "equals": "Microsoft.Network/virtualNetworks"
               },
               {
                  "not": {
                     "field": "Microsoft.Network/virtualNetworks/subnets[*].routeTable.id",
                     "exists": false
                  }
               }
            ]
         },
         {
            "allOf": [
               {
                  "field": "type",
                  "equals": "Microsoft.Network/virtualNetworks/subnets"
               },
               {
                  "field": "Microsoft.Network/virtualNetworks/subnets/routeTable.id",
                  "exists": true
               }
            ]
         }
      ]
   },
   "then": {
      "effect": "deny"
   }
}