Question: In one of my test I need to create a SQL Express database and then populate it.

It's run fine on my machine but when TeamCity tries to run the very same test it throws the following exception:

```
Test(s) failed. System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation.
  ----> System.Data.SqlClient.SqlException : CREATE DATABASE permission denied in database 'master'.

```

What could be causing this?

Answer: 
Your JSON structure is a list of a dictionary. So, you have to write:

```
data[0]["cat1"]

```
To get the values associated with the key `cat1`, try:

```
cat1 = [dct['cat1'] for dct in data]

```

Notice that `data` is a *list* of dicts, not a `dict` itself.
So you have to iterate through the items in the list (i.e. dicts) before you can access the values associated with the key `cat1`.