Activity › Forums › Salesforce® Discussions › How do we create object in javascript controller in lightning? Salesforce® Discussions How do we create object in javascript controller in lightning? Posted by Anuj on July 7, 2020 at 11:43 AM How do we create object in javascript controller in lightning? Kirandeep replied 5 years, 10 months ago 2 Members · 1 Reply 1 Reply Kirandeep Member July 7, 2020 at 11:48 AM Hello Anuj, We can create objects in Javascript like this :- var QuestionDetail = { Name:”Priya”, Id :”20202″ }; Log In to reply. Public All Members My Connections Only Me PublicAll MembersMy ConnectionsOnly Me Public All Members My Connections Only Me