Json qatoridan noyob qiymatlarni ochiladigan burchakka burab qo'ying

Array bu va noyob ism: DomicileName

$scope.domicile = {};
$scope.domicile.users = [{
    DomicileName: 'European',
    PortFolioName: 'nternational Select x EM ADR',
    Alias: 'ADR x EM',
    Percentage: 1.0,
    Ticker: 'ADR',
    Category: 'ADRxEM',
    SortOrder: 1
}, {
    DomicileName: 'European',
    PortFolioName: 'International Select x EM ORD',
    Alias: 'Ord x EM',
    Percentage: 4,
    Ticker: 'ORD',
    Category: 'ADRxEM',
    SortOrder: 1
}, {
    DomicileName: 'European',
    PortFolioName: 'International Select with EM ADR',
    Alias: 'ADR w EM',
    Percentage: 4,
    Ticker: 'ADR',
    Category: 'ADRwEM',
    SortOrder: ''
}, {
    DomicileName: 'Developed Market Non-European',
    PortFolioName: 'International Select x EM ADR',
    Alias: 'ADR x EM',
    Percentage: 4,
    Ticker: 'ADR',
    Category: 'ADRxEM',
    SortOrder: 1
}];
1
Xo'sh, kodingiz qaerda va muammo nimada?
qo'shib qo'ydi muallif Horst Jahns, manba
Xo'sh, kodingiz qaerda va muammo nimada?
qo'shib qo'ydi muallif Horst Jahns, manba
Nimaga erishmoqchisiz?
qo'shib qo'ydi muallif Mistalis, manba
Nimaga erishmoqchisiz?
qo'shib qo'ydi muallif Mistalis, manba
Nimaga erishmoqchisiz?
qo'shib qo'ydi muallif Mistalis, manba
Iltimos, joriy kodni savolga qo'shing.
qo'shib qo'ydi muallif Kacper Polak, manba
Iltimos, joriy kodni savolga qo'shing.
qo'shib qo'ydi muallif Kacper Polak, manba
Iltimos, joriy kodni savolga qo'shing.
qo'shib qo'ydi muallif Kacper Polak, manba
Men ushbu jsonning alohida DomicileName fronini topib, ularni ochilganda bog'lashni xohlayman
qo'shib qo'ydi muallif Arvind Chaudhary, manba
Men ushbu jsonning alohida DomicileName fronini topib, ularni ochilganda bog'lashni xohlayman
qo'shib qo'ydi muallif Arvind Chaudhary, manba
Men ushbu jsonning alohida DomicileName fronini topib, ularni ochilganda bog'lashni xohlayman
qo'shib qo'ydi muallif Arvind Chaudhary, manba
Faqatgina noyob DomicileName-ni filtrlaydigan funksiya yoza olmayapman
qo'shib qo'ydi muallif Arvind Chaudhary, manba
Faqatgina noyob DomicileName-ni filtrlaydigan funksiya yoza olmayapman
qo'shib qo'ydi muallif Arvind Chaudhary, manba
Faqatgina noyob DomicileName-ni filtrlaydigan funksiya yoza olmayapman
qo'shib qo'ydi muallif Arvind Chaudhary, manba

6 javoblar

<div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code">

angular.module('myApp',[]).controller('MyCtrl', function ($scope) {
    $scope.domicile = {};
    $scope.domicile.users = [{
          DomicileName: 'European',
          PortFolioName: 'nternational Select x EM ADR',
          Alias: 'ADR x EM',
          Percentage: 1.0,
          Ticker: 'ADR',
          Category: 'ADRxEM',
          SortOrder: 1
      }, {
          DomicileName: 'European',
          PortFolioName: 'International Select x EM ORD',
          Alias: 'Ord x EM',
          Percentage: 4,
          Ticker: 'ORD',
          Category: 'ADRxEM',
          SortOrder: 1
      }, {
          DomicileName: 'European',
          PortFolioName: 'International Select with EM ADR',
          Alias: 'ADR w EM',
          Percentage: 4,
          Ticker: 'ADR',
          Category: 'ADRwEM',
          SortOrder: ''
      }, {
          DomicileName: 'Developed Market Non-European',
          PortFolioName: 'International Select x EM ADR',
          Alias: 'ADR x EM',
          Percentage: 4,
          Ticker: 'ADR',
          Category: 'ADRxEM',
          SortOrder: 1
      }];
      
      _init();
      
      function _init() {
      	$scope.domicile.users = _uniq($scope.domicile.users, 'DomicileName')
      }
      
      function _uniq(array, property){
       	var flags = [], output = [], l = array.length, i;
        for( i=0; i
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<div ng-app="myApp">
  <div ng-controller="MyCtrl">
    
  </div>
</div>
</div> </div>

0
qo'shib qo'ydi
Ko'p rahmat
qo'shib qo'ydi muallif Arvind Chaudhary, manba

<div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code">

angular.module('myApp',[]).controller('MyCtrl', function ($scope) {
    $scope.domicile = {};
    $scope.domicile.users = [{
          DomicileName: 'European',
          PortFolioName: 'nternational Select x EM ADR',
          Alias: 'ADR x EM',
          Percentage: 1.0,
          Ticker: 'ADR',
          Category: 'ADRxEM',
          SortOrder: 1
      }, {
          DomicileName: 'European',
          PortFolioName: 'International Select x EM ORD',
          Alias: 'Ord x EM',
          Percentage: 4,
          Ticker: 'ORD',
          Category: 'ADRxEM',
          SortOrder: 1
      }, {
          DomicileName: 'European',
          PortFolioName: 'International Select with EM ADR',
          Alias: 'ADR w EM',
          Percentage: 4,
          Ticker: 'ADR',
          Category: 'ADRwEM',
          SortOrder: ''
      }, {
          DomicileName: 'Developed Market Non-European',
          PortFolioName: 'International Select x EM ADR',
          Alias: 'ADR x EM',
          Percentage: 4,
          Ticker: 'ADR',
          Category: 'ADRxEM',
          SortOrder: 1
      }];
      
      _init();
      
      function _init() {
      	$scope.domicile.users = _uniq($scope.domicile.users, 'DomicileName')
      }
      
      function _uniq(array, property){
       	var flags = [], output = [], l = array.length, i;
        for( i=0; i
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<div ng-app="myApp">
  <div ng-controller="MyCtrl">
    
  </div>
</div>
</div> </div>

0
qo'shib qo'ydi
Ko'p rahmat
qo'shib qo'ydi muallif Arvind Chaudhary, manba

<div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code">

angular.module('myApp',[]).controller('MyCtrl', function ($scope) {
    $scope.domicile = {};
    $scope.domicile.users = [{
          DomicileName: 'European',
          PortFolioName: 'nternational Select x EM ADR',
          Alias: 'ADR x EM',
          Percentage: 1.0,
          Ticker: 'ADR',
          Category: 'ADRxEM',
          SortOrder: 1
      }, {
          DomicileName: 'European',
          PortFolioName: 'International Select x EM ORD',
          Alias: 'Ord x EM',
          Percentage: 4,
          Ticker: 'ORD',
          Category: 'ADRxEM',
          SortOrder: 1
      }, {
          DomicileName: 'European',
          PortFolioName: 'International Select with EM ADR',
          Alias: 'ADR w EM',
          Percentage: 4,
          Ticker: 'ADR',
          Category: 'ADRwEM',
          SortOrder: ''
      }, {
          DomicileName: 'Developed Market Non-European',
          PortFolioName: 'International Select x EM ADR',
          Alias: 'ADR x EM',
          Percentage: 4,
          Ticker: 'ADR',
          Category: 'ADRxEM',
          SortOrder: 1
      }];
      
      _init();
      
      function _init() {
      	$scope.domicile.users = _uniq($scope.domicile.users, 'DomicileName')
      }
      
      function _uniq(array, property){
       	var flags = [], output = [], l = array.length, i;
        for( i=0; i
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<div ng-app="myApp">
  <div ng-controller="MyCtrl">
    
  </div>
</div>
</div> </div>

0
qo'shib qo'ydi
Ko'p rahmat
qo'shib qo'ydi muallif Arvind Chaudhary, manba

Mening yondashuvim uchun siz noyob qadriyatlarni olishingiz kerak, siz zamonaviy majmuaviy funktsiyadan foydalanishingiz mumkin, element hozirgi

    $scope.uniqueDomicileUsers = $scope.domicile.users.filter(function(item, i, ar){
         return ar.indexOf(item) === i; 
    })

siz ham noyob bo'lishi kerak bo'lgan ayrim mulklarni tekshirib ko'rishingiz mumkin, bu erda ikkinchi misolda men yashaydigan joydan foydalanaman

  $scope.uniqueDomicileUsers = $scope.domicile.users.filter(function(item, i, ar){
  return ar.indexOf(item) === i && ar[i]['DomicileName']==item['DomicileName']; 
})
0
qo'shib qo'ydi

Mening yondashuvim uchun siz noyob qadriyatlarni olishingiz kerak, siz zamonaviy majmuaviy funktsiyadan foydalanishingiz mumkin, element hozirgi

    $scope.uniqueDomicileUsers = $scope.domicile.users.filter(function(item, i, ar){
         return ar.indexOf(item) === i; 
    })

siz ham noyob bo'lishi kerak bo'lgan ayrim mulklarni tekshirib ko'rishingiz mumkin, bu erda ikkinchi misolda men yashaydigan joydan foydalanaman

  $scope.uniqueDomicileUsers = $scope.domicile.users.filter(function(item, i, ar){
  return ar.indexOf(item) === i && ar[i]['DomicileName']==item['DomicileName']; 
})
0
qo'shib qo'ydi

Mening yondashuvim uchun siz noyob qadriyatlarni olishingiz kerak, siz zamonaviy majmuaviy funktsiyadan foydalanishingiz mumkin, element hozirgi

    $scope.uniqueDomicileUsers = $scope.domicile.users.filter(function(item, i, ar){
         return ar.indexOf(item) === i; 
    })

siz ham noyob bo'lishi kerak bo'lgan ayrim mulklarni tekshirib ko'rishingiz mumkin, bu erda ikkinchi misolda men yashaydigan joydan foydalanaman

  $scope.uniqueDomicileUsers = $scope.domicile.users.filter(function(item, i, ar){
  return ar.indexOf(item) === i && ar[i]['DomicileName']==item['DomicileName']; 
})
0
qo'shib qo'ydi
Angular Uzbekistan
Angular Uzbekistan
107 ishtirokchilar

Guruh Angular bo'yicha muloqot qilish uchun ochilgan Sizni qiziqtirsa: @nodejs_uz @react_uz @angular_uz @yiiframework_uz @js_uzb @typescript_uzb @vuejs_uz @ngTashkent @laravel_uz @uzdevgroup Ish o'rinlari @UzDev_jobs

Javascript UZB
Javascript UZB
99 ishtirokchilar

@js_uzb @vuejs_uz @react_uz @nodejs_uz @angular_uz @ngTashkent @yiiframework_uz @laravel_uz @linux_uzbek @python_uz @swift_uzb —————— @uzdevgroup @UzGeeksGroup ——— @UzDev_Jobs @jobs_uzb

ngTashkent
ngTashkent
77 ishtirokchilar

Правила просты: 1. Не хамить 2. Не хейтить 3. Реакт не нужен Ссылки: https://t.me/angular_ru - старший брат https://t.me/angular_uz - ангулар на узбекском @js_uzb @vuejs_uz @react_uz @nodejs_uz @yiiframework_uz @uzdevgroup @UzDev_Jobs @tasdev_talks