# Pass Parameter in tabs and get user ID

**URL:** <https://forum.ionicframework.com/t/pass-parameter-in-tabs-and-get-user-id/45449>\
**Category:** uncategorized\
**Created:** [March 3, 2016, 6:14pm UTC](https://forum.ionicframework.com/t/pass-parameter-in-tabs-and-get-user-id/45449 "2016-03-03T18:14:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![onigetoc](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/onigetoc/32/90683_2.png) [@onigetoc](https://forum.ionicframework.com/u/onigetoc)\
**Post date:** [March 3, 2016, 6:14pm UTC](https://forum.ionicframework.com/t/pass-parameter-in-tabs-and-get-user-id/45449/1 "2016-03-03T18:14:02Z")

</div>

Based on the tabs demo and chat param.

I want to show user based on there id.

i do not understand this ID things, Should it absolutly be 0,1,2,3,4,5…???

If it begin with any number. 9 for this exemple it do not work.

```
var smss = [{
        id: '9',
        name: 'Ben Sparrow',
        lastText: 'You on your way?',
        face: 'img/ben.png',
        phone: '4181231234'
  }, {
        id: '1',
        name: 'Max Lynx',
        lastText: 'Hey, it\'s me',
        face: 'img/max.png'
  }, {
        id: '2',
        name: 'Adam Bradleyson',
        lastText: 'I should buy a boat',
        face: 'img/adam.jpg'
  }

```

it’s only work if the id number is in order begining by 0.

```
    angular.forEach(smss, function (value, key) {
        console.log(value.id);

        if (value.id === smsId)
            return smss[smsId];

    });

```

OR

```
    smss.forEach(function (sms) {

        if (sms.id === smsId) {

            console.log(sms.id)
            console.log(smss[smsId])
            return smss[smsId];
        }

    })

```

What i really want, is that the ID will be the user phone number.  
id: ‘123-123-1234’,

I do not understand why the id should absolutly be 0,1,2,3,4 ect…
