Scope name is {{currency}}, how to get specific value in view

67 views Asked by At

The scope name is :

{{currency}}

I coded this in view. the output is:

[{"code":"USD","value":"0.00670000"}]

I want to get only value USD in front end.

1

There are 1 answers

0
Amruth On

js code

$scope.currency = [{"code":"USD","value":"0.00670000"}];

Html code

{{currency[0]['code']}}

or

{{currency[0].code}}