sum of the all the stationuserAmount values in the given array

how to calculate the sum of object key values in the given array statement
expected like sum of stationuserAmount = 40

"staions": [
                {
                    "name": "Guwahati",   
                    "stationuser": [
                        {
                            "name": "Suranjan Dey", 
                            "stationuserAmount": "10"
                        }        
                    ]
                },       
                {
                    "name": "Bhubaneshwar",         
                    "stationuser": [
                        {
                            "name": "Soubhagya Behera",      
                            "stationuserAmount": "10"
                        },
                        {
                            "name": "Om Prakash Sahoo",       
                            "stationuserAmount": "20"
                        }
                    ]
                }     ]

Do you have a question? It looks like you just pasted a bunch of code without context.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.