Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript destructure multiple levels

const stuff = {
   data: {
      things: [1,2,3,4]
   }
};
const getThings = ({ data: {things} }) => {
   console.log(things)    
};
getThings(stuff);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #destructure #multiple #levels
ADD COMMENT
Topic
Name
8+8 =