title: How to count json data item ionic2
body: <p>I find a new problem,
  I would like to count <code>@NAME</code> to set array <code>FACET[]</code> for show <code>@KEY</code></p>
  
  <p>Myjson</p>
  
  <pre><code>  "    RESULT":{
                "FACET":[
                  { "@NAME" : "creator", 
                    "@COUNT" : "20",
                    "FACET_VALUES":[
                      {
                        "@KEY":"Book Company1",
                        "@VALUE":"13"},
                      {
                        "@KEY":"Book Company1์",
                        "@VALUE":"10"}],
                  { "@NAME" : "lang", 
                    "@COUNT" : "70",
                    "FACET_VALUES":[
                      {
                        "@KEY":"tha",
                        "@VALUE":"33"},
                      {
                        "@KEY":"eng",
                        "@VALUE":"42"}
                     ],
                  { "@NAME" : "bnb", 
                    "@COUNT" : "64",
                    "FACET_VALUES":[
                      {
                           .
                           .
                           .
  
                ] 
  </code></pre>
  
  <p>.</p>
  
  <pre><code>     optionsFn(): void {
              this.http.get("my_url")
                          .subscribe(data =&gt;{
                                   this.date=data.json().RESULT.FACET; //get @NAME
                          },error=&gt;{
  err =&gt; console.error(err),
                             () =&gt; console.log('getRepos completed')
              );
          console.log(this.date);
  
              console.log(this.date);
              this.goToapply()
        }
  
        goToapply(){
  
         this.http.get("my_url")
                          .subscribe(data =&gt;{
                                   this.foundRepos=data.json().RESULT.FACET[0,1,2,3.4......].FACET_VALUES; ///get @KEY
                          },error=&gt;{
                              console.log(error);
                          } );
  
        }
  </code></pre>
  
  <p>..</p>
  
  <pre><code>    &lt;ion-label&gt;Filterr&lt;/ion-label&gt;
            &lt;ion-select [(ngModel)]="refine" (ionChange)="optionsFn();"&gt;
              &lt;ion-option value="..." *ngFor="let item of date"&gt;{{item["@NAME"]}},({{item["@COUNT"]}})&lt;/ion-option&gt;
            &lt;/ion-select&gt;
  &lt;ion-list&gt;          
            &lt;ion-item *ngFor="let item of foundRepos" (click)="itemClicked($event,item)"&gt;
              &lt;h3&gt; {{ item[@KEY"] }}&lt;/h3&gt;
            &lt;/ion-item&gt;
          &lt;/ion-list&gt;
  </code></pre>
  
  <p>This <code>value="..."</code> I want to keep it to <code>string</code> for to use, but zi have know idea.</p>
  
  <blockquote>
    <p>example : count <code>@NAME = 3 (creator,lang,bnb)</code> ,and get <code>value="..." = 0,1,2 (0==creator ,1==lang ,2==bnb)</code> 
    When I select <code>lang</code> I get <code>1</code> , I use this to <code>FACET[1].FACET_VALUES</code> , So that I get <code>@KEY</code></p>
  </blockquote>
  
  <p>Sorry to write wrong. My english isn't very good.</p>