2

I want to display the name and rate of JSON in angular.js

The JSON looks like this :

{
  "base": "EUR",
  "date": "2016-04-15",
  "rates": {
    "AUD": 1.4648,
    "BGN": 1.9558,
    "BRL": 3.9387,
    "CAD": 1.4535,
    "CHF": 1.0919,
  }
}

I displayed rate, but I have problem with displaying the name. As of now, I only rate displayed. How do I display the name? I'm looking for something like this

Name | Rate
AUD | 1.4648,
BGN | 1.9558,

1 Answer 1

4
<tr ng-repeat="(key, value) in rates">
  <td>{{ key }}</td>
  <td>{{ value }}</td>
</tr>
Sign up to request clarification or add additional context in comments.

2 Comments

Thank You so much!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.