how to use variable key as dictionary key in javascript

Solutions on MaxInterview for how to use variable key as dictionary key in javascript by the best coders in the world

showing results for - "how to use variable key as dictionary key in javascript"
Juan Pablo
20 Sep 2017
1var date = d + "-" + mon + "-" + da.getFullYear()
2        tbl.insertOne({
3            "_id": 104,
4            "Date": {
5                [date]: {
6                    "Activity": "Add agent",
7                    "dateTime": date.toUTCString()
8                }
9            }
10        })