I'm not getting the actual value of my parameter name
in the below function. Object.assign taking the function parameter name
as a string literal so the resulted JSON object also named as name
see the below code.
Please see the resulted json object i got.
How to fix this?