Restangular set the correct ID
<p>I have the problem that the API Im working against always returns the data wrapped inside an array.</p>

<p>So if I call GET api/companies/1/jobs/1 the response looks like this</p>

<pre><code>{
data: [
  {
   id: 1
   name: "blabla"
  }
 ]
}
</code></pre>

<p>When I want to update this job and sent a put the URL is being build wrongly.</p>

<p>Instead of PUT api/companies/1/jobs/1 the request is sent to api/companies/1/jobs and gets rejected.</p>

<p>I have tried the following</p>

<pre><code>RestangularProvider.setRestangularFields({
          id: "data[0].id"
        });
</code></pre>

<p>but unfortunately this does not resolve my problem.</p>

<p>Is there any way to make this work with API being setup as it is?</p>