I don't know about PHP.
But does the nested array only has 3 items. If that is so, maybe you can directly access the index. Or if it is not, reiterate the array to print the value based on the ID.
Anyway, you should have posted this question on Stackoverflow.
I did post it their and it got hidden, telling me it was lacking research which is nonsense as I have been trying to solve this all day
Its the attaching the id number im having issues with I have tried all sorts like
print_r($obj->result->deposits->deposit_id->38->total_earned);
but it wont work
