[Solved] How to send input in JSON form for nested values in NSDictionary


It works like

NSDictionary *fullData = @{
                                     @"title": @"API Generated",
                                     @"description": @"This is the description for the form generated by the API",
                                     @"labelPlacement": @"top_label",
                                     @"button":@{@"type": @"text"},
                                     @"confirmations": @{
                                                                      @"id": @0,
                                                                      @"name": @"Default Confirmation",
                                                                      @"type": @"message",
                                                                      @"message": @"Thanks for contacting us! We will get in touch with you shortly.",
                                                                      @"isDefault": @true,
                                                            },
                                     @"fields": @[
                                                    @{
                                                      @"id":@1,
                                                      @"label":@"My Text",
                                                      @"type":@"text"},
                                                    @{
                                                      @"id":@2,
                                                      @"label":@"My Text 2",
                                                      @"type":@"text"}
                                                    ],
                                                    };

Otherwise it’ll give you Bad request.

solved How to send input in JSON form for nested values in NSDictionary