I have an API that returns the data as an object in this formatattached below, I'm trying to write a function thatwould take the object as an input, then output the occurrence ofeach status value in an object array: i.e. [ERROR: 2,WARNING: 3, OK: 2]. The problem is that I don't knowhow to access and count the values when 'status' is nested underdifferent layers.
```
```
This is the function I'm trying to modify to achieve what Iwant, it only works when 'obj' is a parent of an object with the'status' key
```
}
```
I have an API that returns the data as an object in this format attached below, I'm trying to write a function that wou
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am