title: Composing a Json in a Json for redux action
body: <p>I'm trying to create an action for redux by using an import from a different file, but something isn't working. It's easier to show the code:</p>
  
  <p>In Api.js:</p>
  
  <pre><code>exopt const API =  {
    GET_LIST: {path: '/list', method: 'GET'},
    POST_LIST: {path: '/users/data', method: 'POST'}
  };
  </code></pre>
  
  <p>In action.js:</p>
  
  <pre><code>import { API } from './Api';
  
  export const fetchList = () =&gt; ({
    type: 'API_ACTION',
    payload: {
      API.GET_LIST
    }
  )};
  </code></pre>
  
  <p>I would like fetchList to return the following action:</p>
  
  <pre><code>{
    type: 'API_ACTION',
    payload: {
      path: '/exercises/list',
      method: 'GET'
    }
  }
  </code></pre>
  
  <p>But instead I'm getting an error:</p>
  
  <pre><code>Syntax error: ... Unexpected token, expected , (7:9)
  
     5 |   type: 'API_ACTION',
     6 |   payload: {
  &gt;  7 |      API.GET_LIST,
       |          ^
  </code></pre>
  
  <p>What am I doing wrong?</p>
  
  <p>Appreciate the help!</p>