function foo({ text, user: { screen_name: screenName }}) { console.log('text', text); console.log('name', screenName); } foo({ text: 'hello world', user: { screen_name: 'Jack' }, }); // => text 'hello world' // => name 'Jack'