I am working in Node js - mongoDB . I have a requirement where I need to store and retrieve data in mongoDB which are dynamic and refers to other keys in the collection. Example: firstName : string lastName : string, fullName : string
Assume we insert a record like below
{ firstName : "hello", lastName : "world", fullName : " firstName lastName" }
Now when we retrieve the record the fullName field is expected to show the actual name . In front end , we could use something like string interpolation to achieve this in angular. Is there any way I can directly handle this expression in backend . My actual use case involves more complex structures hence it is not possible to rely on front end.