I have an array of objects like this in json format:
{
  "results": [
    {
      "SwiftCode": "",
      "City": "",
      "BankName": "Deutsche Bank",
      "Bankkey": "10020030",
      "Bankcountry": "DE"
    },
    {
      "SwiftCode": "",
      "City": "10891 Berlin",
      "BankName": "Commerzbank Berlin (West)",
      "Bankkey": "10040000",
      "Bankcountry": "DE"
    }
  ]
}
What I want to get is a object[] in C#, where one object contains all the data what is in one json object. The thing is, I can NOT make a class with the properties of this object like here:
public class Result
{
    public int SwiftCode { get; set; }
    public string City { get; set; }
    //      .
    //      .
    public string Bankcountry { get; set; }
}
Because I get every time different results back, but I know it's always an array of objects. Someone knows how I could manage to get an array of objects back?
EDIT
I have to pass this object to powershell via WriteObject(results). So the ouput should only be the object IN the array.






object[]in c# if you don't even know what the object is going to look like? It sounds like you should be using something like a dictionary instead.