I use the following code
NSArray *jsonArray = [NSJSONSerialization JSONObjectWithData:response 
                                                     options:NSJSONReadingAllowFragments                                                           
                                                       error:&err];
first I want to add 2 options NSJSONReadingAllowFragments, and NSJSONReadingMutableContainers
if I used only NSJSONReadingMutableContainers the code will crash 
now if the response is just string true or false , how to compare the value of NSArray to string "false" for example
I cannot say for example [jsonArray objectatindex:0]
any idea how to make my code intellegent enough such that if only the response is array of object or only string