# Using idMap property for can.Lists

**URL:** <https://forums.bitovi.com/t/using-idmap-property-for-can-lists/408>\
**Category:** Uncategorized\
**Created:** [September 14, 2016, 5:29pm UTC](https://forums.bitovi.com/t/using-idmap-property-for-can-lists/408 "2016-09-14T17:29:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jfleming](https://avatars.discourse-cdn.com/v4/letter/j/59ef9b/32.png) [@jfleming](https://forums.bitovi.com/u/jfleming)\
**Post date:** [September 14, 2016, 5:29pm UTC](https://forums.bitovi.com/t/using-idmap-property-for-can-lists/408/1 "2016-09-14T17:29:06Z")

</div>

The bitballs application uses an idMap property on the players list to avoid sequentially scanning the list each time you want to get a player by id. This doesn’t actually seem to be the case. The idMap gets regenerated for each call to getById

http://jsbin.com/bafiwixoqa/embed?html,js,console

The expected output for this would be:

```
getById
idMap
getById
getById

```

But it is actually:

```
getById
idMap
getById
idMap
getById
idMap

```

How can we create a property that is generated once and is only updated if an observable property it references changes?
