Using variable as object names in react native
<p>I am trying to use a dynamic name for a property of an object. </p>

<p>For example, in the function below, I want to use the value of variable 'catagoryId' to get the child that results into the value for the variable catagoryId. For example if catagoryId = book. I want the last line to resolve to "endAtObject.orderValues.book". </p>

<pre><code>        export const feedFetch = (catagoryId, endAtObject) =&gt; {
        endAtObject.orderValues.&lt;&lt;&lt;catagoryId&gt;&gt;&gt; 
        }
</code></pre>

<p>How do I do this? Any help will be highly appreciated! </p>