I intend to write a function in Javascript where we dynamically create a JSON object based on the input that is given. Say, I give 3 arguments as input (colour, size, price) then a JSON object with these 3 attributes should be created. If I give 4 arguments (name,age,address,mobile) then it should create a JSON object with those 4 arguments. Is it possible? If not any other approaches to implement it in Javascript?