I'm trying to create object with dynamic key and value with SQL Server. Currently I have the following query result:
[
{ "Name": "Ashley", "type": "human" },
{ "Name": "Dori", "type": "cat" }
]
and I am looking to build this:
[ { "Human": "Ashley" }, { "Cat": "Dori" } ]
PS: I'm not sure if it's even possible, but I have no ideas left.