DEV Community

Discussion on: An easy way to create a customize dynamic table in react js

Collapse
 
swaminathan0706 profile image
Swaminathan.V.B

Hi Abdul, Thanks for the tutorial appreciated your work..I am having an issue to be resolved let me know how will you destruct and array of objects which are having key values with space in between for example

const {Stock symbol,Stock name,No of share,Buy price,Current price,Profit Loss}= a;
its throwing error like identified expected
the example u have used all are single words for key like id,name,age,email...
also explain for two words like first name?

Collapse
 
abdulbasit313 profile image
Abdul Basit
let student = {
  "roll no" : 654321,
  "first name" : "John" 
  } 

const {"roll no":  id,  "first name": name} = student

console.log(id, name)

Let me know if it helps...