Question: I have this json

```
"data": [
  {
     "name": "Jual beli hp cod tanjungsari, jatinangor, sumedang, dan sekitarnya",
     "id": "219307605068804",
     "privacy": "OPEN",
     "members": {
        "data": [
           {
              "name": "Andri We Lahk",
              "id": "100026036232248",
              "administrator": false
           }
        ],
        "paging": {
           "cursors": {
              "before": "QVFIUmJHeWstN",
              "after": "QVFIUmJHeWstN1Rna0RnYThZA"
           },
           "next": "https://graph"
        },
        "summary": {
           "total_count": 21424
        }
     }
  }

```

i can get the 'name' data by using this code using newtonsoft

```
JObject results = JObject.Parse(json);
            foreach (var result in results["data"])
            {
                 string name_dt = (string)result["name"];
            }

```

but how i can get the total\_count data in c#?

thanks guys

Answer: 
Although not the most efficient solution, this should work:

```
from itertools import product

dic = {'A': 3, 'B': 4, 'C': 5, 'AB': 6}
choices = list(dic.keys())
prod = []

for a in range(1, len(choices)+2):
    prod = prod + list(product(choices, repeat=a))

result = list(filter(lambda x: ''.join(x) == ''.join(choices), prod))
print(result) 

# prints [('AB', 'C', 'AB'), ('A', 'B', 'C', 'AB'), ('AB', 'C', 'A', 'B'), ('A', 'B', 'C', 'A', 'B')]

```
Use itertools permutations to give all unique combinations.

```
d ={'A': 3, 'B': 4, 'C': 5, 'AB':6}

l = [k for k, v in d.items()]

print(list(itertools.permutations(l)))

```

`[('A', 'B', 'C', 'AB'), ('A', 'B', 'AB', 'C'), ('A', 'C', 'B', 'AB'), ('A', 'C', 'AB', 'B'), ('A', 'AB', 'B', 'C'), ('A', 'AB', 'C', 'B'), ('B', 'A', 'C', 'AB'), ('B', 'A', 'AB', 'C'), ('B', 'C', 'A', 'AB'), ('B', 'C', 'AB', 'A'), ('B', 'AB', 'A', 'C'), ('B', 'AB', 'C', 'A'), ('C', 'A', 'B', 'AB'), ('C', 'A', 'AB', 'B'), ('C', 'B', 'A', 'AB'), ('C', 'B', 'AB', 'A'), ('C', 'AB', 'A', 'B'), ('C', 'AB', 'B', 'A'), ('AB', 'A', 'B', 'C'), ('AB', 'A', 'C', 'B'), ('AB', 'B', 'A', 'C'), ('AB', 'B', 'C', 'A'), ('AB', 'C', 'A', 'B'), ('AB', 'C', 'B', 'A')]`