I'm trying to destructure an object using the following code.
const searchdata = {
org,
packageName,
description,
keywords
} = this.state;
but I get the following error.
Uncaught ReferenceError: org is not defined
What am I doing wrong here? could we destruture and object into another named object?
added a sample of the state object
this.state = {
searchKey: '',
onValueChange: false,
org: '',
packageName: '',
description: '',
keywords: '',
};