# Append 2 objects to Dictionary ? what am I doing wrong

**URL:** <https://forums.kodeco.com/t/append-2-objects-to-dictionary-what-am-i-doing-wrong/15290>\
**Category:** Swift\
**Created:** [May 28, 2016, 12:01am UTC](https://forums.kodeco.com/t/append-2-objects-to-dictionary-what-am-i-doing-wrong/15290 "2016-05-28T00:01:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hcri50](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@hcri50](https://forums.kodeco.com/u/hcri50)\
**Post date:** [May 28, 2016, 12:01am UTC](https://forums.kodeco.com/t/append-2-objects-to-dictionary-what-am-i-doing-wrong/15290/1 "2016-05-28T00:01:04Z")

</div>

var objects = [[“name”:“Robert”, “time”: “12:20”], [“name”: “George”, “time” : “2:30”]]

objects[[“name”] = “James”, [“time”] = “6:55”]

---

<div class="post-metadata">

**Author:** ![narrativium](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/narrativium/32/110937_2.png) [@narrativium](https://forums.kodeco.com/u/narrativium)\
**Post date:** [May 28, 2016, 2:06pm UTC](https://forums.kodeco.com/t/append-2-objects-to-dictionary-what-am-i-doing-wrong/15290/2 "2016-05-28T14:06:03Z")

</div>

You’ve initialised `objects` as an array of dictionaries. Was that your intent? If you’re adding a new dictionary to the array, you’d use `objects.append(["name": "James", "time": "6:55"])`.

---

<div class="post-metadata">

**Author:** ![hcri50](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@hcri50](https://forums.kodeco.com/u/hcri50)\
**Post date:** [May 28, 2016, 9:04pm UTC](https://forums.kodeco.com/t/append-2-objects-to-dictionary-what-am-i-doing-wrong/15290/3 "2016-05-28T21:04:13Z")

</div>

> [@hcri50](#):
>
> var objects = [[“name”:“Robert”, “time”: “12:20”], [“name”: “George”, “time” : “2:30”]]

oh THANK YOU SO MUCH. I do not understand why I did not grasp this.  
THANK YOU AGAIN  
robert
