title: accessing object in react with map
body: <p>I have some difficulties accessing the key/values inside an object even tho i have said it is an array. (.map gave me error)</p>
  <p>With axios post i have this type in response</p>
  <pre><code> type response = {
      data: [];
    };
  </code></pre>
  <p>Response from API:</p>
  <pre><code>&quot;data&quot;: {
          &quot;thisoneineed&quot;: false,
          &quot;response&quot;: [{
              &quot;ID&quot;: &quot;1234&quot;,
          }],
          &quot;message&quot;: &quot;this is a test message&quot;,
      }
  </code></pre>
  <p>inside my components i get this from a redux state (i am saving it in the state after the response)</p>
  <p>when i try this:</p>
  <pre><code>Object.entries(state).map(([key, value]) =&gt; {
    console.log(key);
  })
  </code></pre>
  <p>It gives me all they keys inside the array.</p>
  <p>What i need to do is to access the value based on a key value so i did like this: (inside a component)</p>
  <pre><code> const insurance = useSelector(
      (state: AppState) =&gt; state.session.data
  );
  
      Object.entries(insurance).map(([key, value]) =&gt; {
        console.log(key[thisoneineed]);
      })
  </code></pre>
  <p>This gives:</p>
  <blockquote>
  <p>TS2304: Cannot find name 'thisoneineed'.</p>
  </blockquote>
  <p>I was woundering how can i access the success key and get the value.</p>