js deconstruct get variable from object into new variable code example
Example 1: object destructuring into this
const demo = { nextUrl: 'nextUrl', posts: 'posts' };
const target = {}; // replace target with this
({ nextUrl: target.nextUrl, posts: target.communityPosts } = demo);
console.log(target);
Example 2: js object destructuring
const { [propName]: identifier } = expression;