mercredi 25 septembre 2019

What is the best way to get class field value based on Key value config in Database

I have a class with fields

field1;
field2;
field3;

and in MongoDB, I have key-value payer which could be any of the fields with a specific value
eg: 1) "Field1" : "A"
or 2) "Field2" : "b" , "Field3" : "c"

How can I get the Class field-based value and compare with MongoDB asked Field name: Via reflection or any other better method Thanks





Aucun commentaire:

Enregistrer un commentaire