Help me to create single object with dynamic properties.
For example: Suppose we are getting the following object from database,
var obj=[
{"name":"John", "age":35},
{"name":"Greesham", "age":37},
{"name":"Raman","age":42},
{"name":"Krish", "age":30}];
Now we want to create an object with above object values as keys/properties in c# class.
Expected Result:
var obj2=new{ John=35, Greesham=37, Raman=42, Krish=30 };
[Note: Here i can use IDictionary but i want only one object, to pass templater plugin to print in word document]
Thanks in advance.