My web service returns an array of objects that looks like this:
[
{
"abc": "test 1"
},
{
"def": "test 2"
},
{
"ghi": "test 3"
}
]
Now I want to declare a TypeScript interface for this result. But I have no idea how to do that because the key of each object can be string whose name varies.
Specifically:
- An object has exactly one property.
- The key of that property can have any name.
- The value of the property is a string.