HI All,
I need a quick and easy way to count the number of users in my JSON response.
I have a HTTP request to my site which returns a list of users but i need to count them. I’ve seen to use the SET node but i can’t seem to see it.
I’ve also tried to anonamize the data
N8N version: Version 1.115.3
Self Hosted
{
“nodes”: [
{
“parameters”: {},
“type”: “n8n-nodes-base.manualTrigger”,
“typeVersion”: 1,
“position”: [
0,
0
],
“id”: “12c13e57-1194-4035-871b-f14d30e53b68”,
“name”: “When clicking ‘Execute workflow’”
},
{
“parameters”: {
“method”: “POST”,
“url”: “``https://site.co.za/login/token.php?”``,
“sendBody”: true,
“contentType”: “form-urlencoded”,
“bodyParameters”: {
“parameters”: [
{
“name”: “username”,
“value”: “username”
},
{
“name”: “password”,
“value”: “password”
},
{
“name”: “service”,
“value”: “servicename”
}
]
},
“options”: {}
},
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 4.2,
“position”: [
208,
0
],
“id”: “05357720-9c0b-48e7-8619-30e98634d1ed”,
“name”: “HTTP Request”
},
{
“parameters”: {
“url”: “``https://site.com/webservice/rest/server.php”``,
“sendQuery”: true,
“queryParameters”: {
“parameters”: [
{
“name”: “wstoken”,
“value”: “={{ $json.token }}”
},
{
“name”: “wsfunction”,
“value”: “core_user_get_users”
},
{
“name”: “moodlewsrestformat”,
“value”: “json”
},
{
“name”: “criteria[0][key]”,
“value”: “email”
},
{
“name”: “criteria[0][value]”,
“value”: “%”
}
]
},
“options”: {}
},
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 4.2,
“position”: [
416,
0
],
“id”: “34037ed1-ab22-412f-9971-52923fc0da91”,
“name”: “HTTP Request1”
}
],
“connections”: {
“When clicking ‘Execute workflow’”: {
“main”: [
[
{
“node”: “HTTP Request”,
“type”: “main”,
“index”: 0
}
]
]
},
“HTTP Request”: {
“main”: [
[
{
“node”: “HTTP Request1”,
“type”: “main”,
“index”: 0
}
]
]
},
“HTTP Request1”: {
“main”: [
]
}
},
“pinData”: {},
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “5f51c34462b71c0956773960a67866178496727ce5d5358103caf396f8cc79d0”
}
}