title: Angular Resource with Hateoas and application/hal+json
body: <p>I have this kind of response format from backend (URL is <a href="http://localhost:8080/App/api/currency" rel="nofollow">http://localhost:8080/App/api/currency</a> ):</p>
  
  <pre><code>{
    "content": [
      {
        "code": "CHF",
        "_links": [
          {
            "rel": "self",
            "href": "http://localhost:8080/App/api/currency/CHF"
          }
        ]
      },
      {
        "code": "EUR",
        "_links": [
          {
            "rel": "self",
            "href": "http://localhost:8080/App/api/currency/EUR"
          }
        ]
      },
      {
        "code": "USD",
        "_links": [
          {
            "rel": "self",
            "href": "http://localhost:8080/App/api/currency/USD"
          }
        ]
      },
      {
        "code": "AUD",
        "_links": [
          {
            "rel": "self",
            "href": "http://localhost:8080/App/api/currency/AUD"
          }
        ]
      },
      {
        "code": "CAD",
        "_links": [
          {
            "rel": "self",
            "href": "http://localhost:8080/App/api/currency/CAD"
          }
        ]
      },
      {
        "code": "GBP",
        "_links": [
          {
            "rel": "self",
            "href": "http://localhost:8080/App/api/currency/GBP"
          }
        ]
      },
      {
        "code": "NZD",
        "_links": [
          {
            "rel": "self",
            "href": "http://localhost:8080/App/api/currency/NZD"
          }
        ]
      },
      {
        "code": "JPY",
        "_links": [
          {
            "rel": "self",
            "href": "http://localhost:8080/App/api/currency/JPY"
          }
        ]
      },
      {
        "code": "SEK",
        "_links": [
          {
            "rel": "self",
            "href": "http://localhost:8080/App/api/currency/SEK"
          }
        ]
      },
      {
        "code": "NOK",
        "_links": [
          {
            "rel": "self",
            "href": "http://localhost:8080/App/api/currency/NOK"
          }
        ]
      },
      {
        "code": "ISK",
        "_links": [
          {
            "rel": "self",
            "href": "http://localhost:8080/App/api/currency/ISK"
          }
        ]
      },
      {
        "code": "DKK",
        "_links": [
          {
            "rel": "self",
            "href": "http://localhost:8080/App/api/currency/DKK"
          }
        ]
      }
    ],
    "_links": [
      {
        "rel": "self",
        "href": "http://localhost:8080/App/api/currency"
      }
    ]
  }
  </code></pre>
  
  <p>To query it with Angular I use <code>$resource's</code> query method. But this response structure does not work well with <code>$resource</code>:</p>
  
  <ul>
  <li>query expects array. Here I have single object</li>
  <li>array items are treated as single resources</li>
  </ul>
  
  <p>How can I make this response work with <code>$resource</code> i.e. instruct it to take <code>content</code> as actual data for constructing <code>$resource</code> objects. Or are there any robust solutions for it?</p>