---
title: "NSArray of dictionaries"  
description: "NSArray of dictionaries"  
author: "Tarun Kumar"  
published: 2015-07-17  
updated: 2015-07-18  
canonical: https://www.mindstick.com/forum/23352/nsarray-of-dictionaries  
category: "iphone"  
tags: ["iphone", "ios", "objective c"]  
reading_time: 1 minute  

---

# NSArray of dictionaries

I have NSArray of NSDictionaries which is coming from [server](https://www.mindstick.com/articles/43769/what-is-serverless-architecture-is-it-worth-switching-over) as [JSON format](https://www.mindstick.com/forum/158266/what-is-the-json-format). I want to [add](https://www.mindstick.com/forum/12983/add-address-in-textbox-when-page-is-load-and-if-i-search-address-in-textbox-show-in-map-by-javascript) one more NSDictinoary to the NSArray of NSDictionaries. NSDictionary is based on key [value](https://www.mindstick.com/articles/23219/an-optimized-description-adds-value-to-experience-and-in-turn-effectively-guest-posting-packages) pair. This is the [response](https://www.mindstick.com/forum/12719/how-to-make-response-write-display-special-character-like-lt-gt) which I [am getting](https://www.mindstick.com/forum/34179/i-am-getting-error-while-assigning-the-data-to-the-array-list). I want to add another [dictionary](https://www.mindstick.com/articles/1500/hashtable-and-dictionary-in-c-sharp) of same format into "[table](https://www.mindstick.com/articles/43918/how-to-design-table-using-bootstrap)". Pls Help..

Thanks in advance..!!

```
Table =  (        {            Name = “xyz”;            Recordid = 3;            prefrenceorder = 1;        },        {            Name = “ABC”;            Recordid = 2;            prefrenceorder = 2;        },        {            Name = “swe”;            Recordid = 450;            prefrenceorder = 3;        },        {            Name = “asd”;            Recordid = 451;            prefrenceorder = 4;        }    );
```

## Replies

### Reply by Anonymous User

As the NSArray coming from server is immutable so you need to create a new instance of NSMutableArray to add your own dictionary with the response coming from server.

NSMutableArray *newTable = [NSMutableArray arrayWithArray:Table];

[newTable addObject:your_new_dictionary];


---

Original Source: https://www.mindstick.com/forum/23352/nsarray-of-dictionaries

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
