After reproducing from my end, I could able to achieve your requirement following the below steps.
For demonstration purposes, I have used the below Json taking sample image url.
{
"id": "123",
"Person": {
"Name": "Testmann",
"Firstname": "Tim"
},
"Timestamp": "2023-03-22T20:16:04.663252+01:00",
"Tree": {
"fileId": "123",
"fileName": "Tree_2023_03_22_19_16_09.png",
"timestamp": "2023-03-22T19:16:09.082243Z",
"contentType": "image/png",
"size": 123,
"url": "https://www.thewowstyle.com/wp-content/uploads/2015/02/now-i-am-free.jpg"
}
}
Below is the complete flow of my logic apps

Below is the parse json action schema of my logic app
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"Person": {
"type": "object",
"properties": {
"Name": {
"type": "string"
},
"Firstname": {
"type": "string"
}
}
},
"Timestamp": {
"type": "string"
},
"Tree": {
"type": "object",
"properties": {
"fileId": {
"type": "string"
},
"fileName": {
"type": "string"
},
"timestamp": {
"type": "string"
},
"contentType": {
"type": "string"
},
"size": {
"type": "integer"
},
"url": {
"type": "string"
}
}
}
}
}
Results:


Update
This can be done using Json Properties to Name Value Pair Array
action. Below is something that you can do to achieve your requirement.

Flow inside True block

Results:


Code-view of my logic app
{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"For_each": {
"actions": {
"Compose_2": {
"inputs": "@items('For_each')",
"runAfter": {},
"type": "Compose"
},
"Condition": {
"actions": {
"Create_file": {
"inputs": {
"body": "@body('HTTP')",
"host": {
"connection": {
"name": "@parameters('$connections')['sharepointonline']['connectionId']"
}
},
"method": "post",
"path": "/datasets/@{encodeURIComponent(encodeURIComponent('https://<>.sharepoint.com/<>/<>'))}/files",
"queries": {
"folderPath": "/Shared Documents/urlImages",
"name": "@{items('For_each')['propertyValue'][1]['propertyValue']}",
"queryParametersSingleEncoded": true
}
},
"runAfter": {
"HTTP": [
"Succeeded"
]
},
"runtimeConfiguration": {
"contentTransfer": {
"transferMode": "Chunked"
}
},
"type": "ApiConnection"
},
"HTTP": {
"inputs": {
"method": "GET",
"uri": "@{items('For_each')['propertyValue'][5]['propertyValue']}"
},
"runAfter": {},
"type": "Http"
}
},
"expression": {
"and": [
{
"not": {
"equals": [
"@items('For_each')['propertyName']",
"id"
]
}
},
{
"not": {
"equals": [
"@items('For_each')['propertyName']",
"Person"
]
}
},
{
"not": {
"equals": [
"@items('For_each')['propertyName']",
"Timestamp"
]
}
}
]
},
"runAfter": {
"Compose_2": [
"Succeeded"
]
},
"type": "If"
}
},
"foreach": "@body('Json_Properties_to_Name_Value_Pair_Array')",
"runAfter": {
"Json_Properties_to_Name_Value_Pair_Array": [
"Succeeded"
]
},
"type": "Foreach"
},
"Json_Properties_to_Name_Value_Pair_Array": {
"inputs": {
"body": {
"data": "@json(triggerBody())"
},
"host": {
"connection": {
"name": "@parameters('$connections')['advanceddataoperatio_1']['connectionId']"
}
},
"method": "post",
"path": "/JsonPropertiesToNameValuePairArray"
},
"runAfter": {},
"type": "ApiConnection"
}
},
"contentVersion": "1.0.0.0",
"outputs": {},
"parameters": {
"$connections": {
"defaultValue": {},
"type": "Object"
}
},
"triggers": {
"manual": {
"inputs": {
"schema": {}
},
"kind": "Http",
"type": "Request"
}
}
},
"parameters": {
"$connections": {
"value": {
"advanceddataoperatio_1": {
"connectionId": "/subscriptions/<subid>/resourceGroups/<rg>/providers/Microsoft.Web/connections/advanceddataoperatio-1",
"connectionName": "advanceddataoperatio-1",
"id": "/subscriptions/<subid>/providers/Microsoft.Web/locations/eastus/managedApis/advanceddataoperatio"
},
"sharepointonline": {
"connectionId": "/subscriptions/<subid>/resourceGroups/<rg>/providers/Microsoft.Web/connections/sharepointonline",
"connectionName": "sharepointonline",
"id": "/subscriptions/<subid>/providers/Microsoft.Web/locations/eastus/managedApis/sharepointonline"
}
}
}
}
}