function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Annu Singh 16Annu Singh 16 

How to bind properties in Object in LWC

Hi All 
 I want to console log an object which I creating in javascript. but while running it is showing Undefined in Rsult.
here is the code
  @api Value='hello';
 let   mutiQuery={warn:this.value};
     handleClick(){
      console.log(JSON.stringify(this.multiQuery));
      
   }
if I write mutiQuery={warn:'hello'};
then its working fine but on writing this.value it is showing undefined
how can I solve this.
Hara SahooHara Sahoo
Please try this.Value, as it is case sensitive
mukesh guptamukesh gupta
Hii Annu,

Please use  
 
this.Value

you are using this.value  that's you are facinfg this issue

if you need any assistanse, Please let me know!!

Kindly mark my solution as the best answer if it helps you.

Thanks
Mukesh