I'm doing like that
"variables" : {
"subnetAddress" : "[first(split(parameters('subnetAddressWithMask'), '/'))]",
"subnetOctets3" : "[take(split(variables('subnetAddress'), '.'), 3)]",
"subnetNetwork" : "[concat(variables('subnetOctets3')[0], '.', variables('subnetOctets3')[1], '.', variables('subnetOctets3')[2])]"
},
"outputs": {
"subnetAddress" : {
"type": "string",
"value" : "[variables('subnetAddress')]"
},
"subnetOctets3" :
{
"type": "array",
"value" : "[variables('subnetOctets3')]"
}
,
"subnetNetwork" : {
"type" : "string",
"value" : "[variables('subnetNetwork')]"
}
with output
"Outputs": {
"deploymentAppGw": {
"Type": "Object",
"Value": {
"subnetAddress": {
"type": "String",
"value": "10.0.0.0"
},
"subnetOctets3": {
"type": "Array",
"value": [
"10",
"0",
"0"
]
},
"subnetNetwork": {
"type": "String",
"value": "10.0.0"
}
}
}
},
Later I'm using it in this way: "[concat(variables('subnetNetwork'), '.', copyIndex(10))]"
or in similar way.