# Modelling a map in ember data

**URL:** <https://discuss.emberjs.com/t/modelling-a-map-in-ember-data/2170>\
**Category:** Ember Data\
**Created:** [August 15, 2013, 4:25pm UTC](https://discuss.emberjs.com/t/modelling-a-map-in-ember-data/2170 "2013-08-15T16:25:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![thomas\_mitchell](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/thomas_mitchell/32/4649_2.png) [@thomas\_mitchell](https://discuss.emberjs.com/u/thomas_mitchell)\
**Post date:** [August 15, 2013, 4:25pm UTC](https://discuss.emberjs.com/t/modelling-a-map-in-ember-data/2170/1 "2013-08-15T16:25:00Z")

</div>

Hi,

I’m having some trouble figuring out how to model a map in ember data. I have an object already modelled that has a map as one of the fields.

Is there anything built in to ember to deal with this or am I going to have to model a key value tag and add an array of these to deal with this? Something like this:

```
App.KeyValue = DS.Object.extend({
  key: DS.attr('string'),
  value: DS.hasMany('App.Field')
});

```

App.Field being another model.
