sivakumari
sivakumari

Reputation: 1

JSON Value for key is starting with@

I have the json response like below:

  "hj.tradingResponse" =     {
    "@approved" = true;
    "@qualified" = true;
    billingAddress =         {
        address = "146 W. Main Street";
        city = Aguilar;
        country = US;
        postalCode = 81020;
        state = Colorado;
    };

I stored a result in a dictionary. Byt when I give value for key [result valueForKey:@"\"@approved\""];

I'm getting null value but I thought @approved is not recognising.

Any idea how to solve this?

Upvotes: 0

Views: 193

Answers (1)

user123444555621
user123444555621

Reputation: 152956

In JSON, the quotes themselves are not part of the key.

Try

[result valueForKey:@"@approved"]

Upvotes: 1

Related Questions