Hi everyone,
I think I may be running into a limitation with Tasker’s JSON variable parsing, but I want to confirm I am not misunderstanding how it is supposed to work.
Here is a simplified example to show the problem.
Example JSON:
{
"items": [
{
"name": "Phone",
"types": [
"Android",
"Pixel",
"Work"
]
},
{
"name": "Laptop",
"types": [
"Windows",
"Gaming",
"Personal"
]
}
]
}
What I want to do is directly access nested values.
Accessing the first level works fine:
%json.items(1).name → Phone
But if I try to go one level deeper:
%json.items(1).types(2)
it does not work.
Interestingly, I can access second level items using %json.types(2) but if we have multiple objects at the first level this doesn't help
The only workaround I have found is doing this in two steps:
- Set %temp = %json.items(1)
- Then access %temp.types(2)
This works, but it feels inefficient and messy when dealing with larger JSON structures or loops.
Am I missing a better way to access nested arrays directly? Or is this a known limitation or bug in Tasker’s JSON handling? Any insight would be appreciated.